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').on('submit', function(e) { | |
e.preventDefault(); | |
$.ajax({ | |
type: "POST", | |
url: $(this).attr('action'), | |
data: $(this).serialize(), | |
success: function(resp) { | |
var obj = $.parseJSON(resp); | |
if (obj.resp == 0) { | |
$(this).alertBox(obj.err, { type: 'error'}); |
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 user extends CI_Controller { | |
public function __construct() { | |
parent::__construct(); | |
} | |
function login() { | |
$data = ''; |
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 | |
/** | |
* Date: 12/31/12 | |
* Time: 9:36AM | |
* Model corresponding to all actions one can take on a users account. | |
*/ | |
class bm_users extends CI_Model { | |
function login($data) { |
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
$.fn.resetForm = function() { | |
$(this).removeAlertBoxes(); | |
return this.each(function() { | |
// guard against an input with the name of 'reset' | |
// note that IE reports the reset function as an 'object' | |
if (typeof this.reset == 'function' || (typeof this.reset == 'object' && !this.reset.nodeType)) | |
this.reset(); | |
}); | |
}; |
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').on("submit", function(e) { | |
$.ajax({ | |
type: "POST", | |
url: $(this).attr('action'), | |
data: $(this).serialize(), | |
success: function(resp) { | |
var obj = $.parseJSON(resp); | |
if (obj.resp == 0) { | |
$(this).removeAlertBoxes(); | |
$(this).alertBox(obj.err, { type: 'error'}); |
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 BM_Controller extends CI_Controller { | |
function __construct() { | |
parent::__construct(); | |
$logged = $this->check_login(); | |
$cArray = array('login', 'logout'); | |
$this->load->helper('url'); |
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 | |
/** | |
* Created by JetBrains PhpStorm. | |
* User: bonk | |
* Date: 1/6/13 | |
* Time: 1:55 PM | |
* To change this template use File | Settings | File Templates. | |
*/ | |
class users extends BM_Controller { |
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
function include(script) { | |
$.ajax({ | |
url: script, | |
dataType: "script", | |
async: false, | |
success: function() { | |
// everything works fine | |
}, | |
error: function() { | |
throw new Error("Could not load script " + script); |
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
<!--[if IE]> | |
<style type="text/css"> | |
html { display: none; } | |
</style> | |
<![endif]--> |
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 | |
function get_catalog_new($column=1, $storeID=0, $parentID=0, $isFront=0) { | |
if ($isFront != 0) { | |
// information is being pulled from the new front end. | |
$newJoin = "LEFT JOIN ic_product_stores as st ON $storeID = st.storeID AND prod.productID = st.productID"; | |
$extsql = " AND st.oos = 0"; | |
} else { | |
// information is being pulled from the administration panel. | |
$newJoin = ''; | |
$extsql = ''; |
OlderNewer