AAAAview.html.php 0000666 00000006376 15137453523 0007222 0 ustar 00 getCoupon(); $this->SetViewTitle('', $coupon->coupon_code); $layoutName = JRequest::getWord('layout', 'default'); // if(Vmconfig::get('multix','none')!=='none'){ // $vendorList= ShopFunctions::renderVendorList($coupon->virtuemart_vendor_id); // $this->assignRef('vendorList', $vendorList); // } $vendorModel = VmModel::getModel('Vendor'); $vendorModel->setId(1); $vendor = $vendorModel->getVendor(); $currencyModel = VmModel::getModel('Currency'); $currencyModel = $currencyModel->getCurrency($vendor->vendor_currency); $this->assignRef('vendor_currency', $currencyModel->currency_symbol); if ($layoutName == 'edit') { if ($coupon->virtuemart_coupon_id < 1) { // Set a default expiration date $_expTime = explode(',', VmConfig::get('coupons_default_expire','14,D')); if (!empty( $_expTime[1]) && $_expTime[1] == 'W') { $_expTime[0] = $_expTime[0] * 7; $_expTime[1] = 'D'; } if (version_compare(PHP_VERSION, '5.3.0', '<')) { $_dtArray = getdate(time()); if ($_expTime[1] == 'D') { $_dtArray['mday'] += $_expTime[0]; } elseif ($_expTime[1] == 'M') { $_dtArray['mon'] += $_expTime[0]; } elseif ($_expTime[1] == 'Y') { $_dtArray['year'] += $_expTime[0]; } $coupon->coupon_expiry_date = mktime($_dtArray['hours'], $_dtArray['minutes'], $_dtArray['seconds'] , $_dtArray['mon'], $_dtArray['mday'], $_dtArray['year']); } else { $_expDate = new DateTime(); $_expDate->add(new DateInterval('P'.$_expTime[0].$_expTime[1])); $coupon->coupon_expiry_date = $_expDate->format("U"); } } $this->assignRef('coupon', $coupon); $this->addStandardEditViewCommands(); } else { $this->addStandardDefaultViewCommands(); $this->addStandardDefaultViewLists($model); $coupons = $model->getCoupons(); $this->assignRef('coupons', $coupons); $pagination = $model->getPagination(); $this->assignRef('pagination', $pagination); } parent::display($tpl); } } // pure php no closing tag index.html 0000666 00000000000 15137453523 0006543 0 ustar 00 tmpl/default.php 0000666 00000007075 15137453523 0007702 0 ustar 00