public function gencustomorderAction()
 {
     $generic = new Model_Generic();
     $table = $this->_getParam('tbl');
     $this->view->data = $generic->getCustomOrder($table);
 }
示例#2
0
 public function sendResetPasswordCode($email, $code)
 {
     $subject = '[EazyFashion] Reset Password';
     $headers = 'From: noreply@eazyfashion.com' . "\r\n" . 'Reply-To: noreply@eazyfashion.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion();
     $headers .= "MIME-Version: 1.0\r\n";
     $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
     $generic = new Model_Generic();
     $generic->oldSkul("update SiteUsers set ResetCode = '" . $code . "' where SiteEmail = '" . $email . "'  ", false);
     $message = "Your reset code is <strong>" . $code . "</strong>";
     //$this->Mailer($email,$subject,$message,$headers);
 }
 private function categories()
 {
     $generic = new Model_Generic();
     return $generic->getData('Category', '', 'Name');
 }
 public function reselleryapplyAction()
 {
     $user = $this->isLoggedIn();
     if ($user && $_POST) {
         $generic = new Model_Generic();
         $generic->oldSkul("delete from ResellerApplications where SiteUserID = " . $user['ID'], false);
         $Require1 = 0;
         $Require2 = 0;
         $Require3 = 0;
         if (isset($_POST['Require1'])) {
             $Require1 = 1;
         }
         if (isset($_POST['Require2'])) {
             $Require2 = 1;
         }
         if (isset($_POST['Require3'])) {
             $Require3 = 1;
         }
         $sql = "insert into ResellerApplications values(" . $user['ID'] . "," . $Require1 . "," . $Require2 . "," . $Require3 . ")";
         $generic->oldSkul($sql, false);
     }
     $this->_redirect('/profile/');
 }
示例#5
0
 private function getProductAttributes($product_id)
 {
     $generic = new Model_Generic();
     $product_attributes = $generic->getData('ProductAttributes', 'ProductID=' . $product_id);
     $data = array();
     foreach ($product_attributes as $row => $val) {
         //print_r( $row);
         $data[$val['Name']] = $val;
     }
     return $data;
 }
 public function menuAction()
 {
     $isAdmin = $this->isAdmin();
     $generic = new Model_Generic();
     $this->view->menus = $generic->getData("Menu");
     $menu_id = isset($_GET['mid']) ? $_GET['mid'] : 0;
     $this->view->menu_id = $menu_id;
     $menu_items = $generic->getData("MenuItems", "MenuID=" . $menu_id, "CustomOrder");
     $this->view->menu_items = $menu_items;
     if ($_POST) {
         if (isset($_POST['MenuEdit'])) {
             $menu_id = $_POST['MenuID'];
             $data = array();
             foreach ($_POST['Name'] as $row => $val) {
                 $data[$row]['MenuID'] = $menu_id;
                 $data[$row]['Name'] = $val;
             }
             foreach ($_POST['Link'] as $row => $val) {
                 $data[$row]['Link'] = $val;
             }
             foreach ($_POST['CustomOrder'] as $row => $val) {
                 $data[$row]['CustomOrder'] = $val;
             }
             $delete = $generic->oldSkul("delete from MenuItems where MenuID = " . $menu_id, false);
             foreach ($data as $updatemenu) {
                 $generic->insertData("MenuItems", $updatemenu);
             }
             $this->_redirect('/page/menu/?mid=' . $_POST['MenuID']);
         }
         if (isset($_POST['MenuAdd'])) {
             unset($_POST['MenuAdd']);
             $save = $generic->insertData("MenuItems", $_POST);
             if ($save) {
                 $this->_redirect('/page/menu/?mid=' . $_POST['MenuID']);
             }
         }
     }
     if (isset($_GET['mitid'])) {
         $generic->oldSkul("delete from MenuItems where ID = " . $_GET['mitid'], false);
         $this->_redirect('/page/menu/?mid=' . $menu_id);
     }
 }