This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout -- / |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Mark orders as exported | |
* | |
* @params $orderId int Order ID that should be marked as exported. | |
* @return Phoenix_Logwin_Model_Orders | |
*/ | |
protected function _setOrderExportStatus($order, $exportStatus = 0, $historyMarker = self::ORDER_EXPORT_HISTORY_MARKER) | |
{ | |
$exportStatus = $order->getExportStatus()|$exportStatus; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$installer = $this; | |
$installer->startSetup(); | |
Mage::register('isSecureArea', 1); | |
Mage::app()->setUpdateMode(false); | |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); | |
$db = Mage::getSingleton('core/resource')->getConnection('core_read'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<layout version="0.1.0"> | |
<contacts_index_index translate="label"> | |
<label>Contact Us Form</label> | |
<reference name="root"> | |
<action method="setTemplate"><template>page/3columns.phtml</template></action> | |
<action method="setHeaderTitle" translate="title" module="contacts"><title>Contact Us</title></action> | |
</reference> | |
<reference name="content"> | |
<block type="core/template" name="contactForm" template="contacts/form.phtml"> | |
<block type="captcha/captcha" name="captcha"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="<?php echo $this->getFormAction(); ?>" id="contactForm" method="post" class="form"> | |
... | |
<?php echo $this->getChildHtml('captcha'); ?> | |
... | |
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<config> | |
... | |
<global> | |
<events> | |
<controller_action_predispatch_routename_controller_method> | |
<observers> | |
<module> | |
<class>module/observer</class> | |
<method>checkCaptcha</method> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Your_Module_Model_Observer | |
{ | |
/** | |
* Get Captcha String | |
* | |
* @param Varien_Object $request | |
* @param string $formId | |
* @return string | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT mod(num,PAGE_SIZE) as row, ceil(num/PAGE_SIZE) as page | |
FROM (SELECT *, @rownum:=@rownum + 1 AS num FROM users, (SELECT @rownum:=0) r ORDER BY username) d | |
WHERE d.userid=141414 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Math | |
{ | |
var $operations = array( | |
'+' => 'plus', | |
'-' => 'minus', | |
'*' => 'multiply', | |
'/' => 'devide', | |
// add more functions here | |
); |