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 | |
/** | |
* Check if upload place exists | |
* | |
* @access private | |
* @param upload_place string | |
* @return string | |
*/ | |
private function check_upload_place($upload_place) | |
{ |
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
<!-- Items list --> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
// Drag-and-drop table with ordering feature | |
<?php if($table_rules['params']['ordered'] !== FALSE): ?> | |
$('#list_table').tableDnD({ | |
onDrop: function(table, row) { |
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
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> | |
<meta itemprop="price" content="0.5900" /> | |
</div> |
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 | |
); |
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 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
<?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
<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
<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
<?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'); |