Example #1
0
 public function index()
 {
     $this->load->language('module/blog_latest');
     $data['heading_title'] = html_entity_decode($this->config->get('blog_latest_title'));
     $group_id = $this->customer->getGroupId();
     // $cacheKey = 'blog_categories.' . $group_id;
     // $category_tree = $this->cache->get($cacheKey);
     //  if (!$category_tree) {
     $this->load->model('blog/category');
     $this->load->model('setting/rights');
     $posts = $this->model_blog_category->getLatestPosts(array('start' => 0, 'limit' => $this->config->get('blog_latest_post_count')));
     $data['posts'] = array();
     $this->load->model('tool/image');
     foreach ($posts as $post) {
         $post = $this->model_blog_category->loadParent($post['ams_page_id'])->toArray();
         $post['image'] = $this->model_tool_image->resize($post['featured_image'], 80, 80);
         if (!$post['image']) {
             $post['image'] = $this->model_tool_image->resize('no_image.jpg', 80, 80);
         }
         $post['name'] = html_entity_decode($post['name']);
         $post['date'] = DATE($this->language->get('post_date_format'), $post['publish_date']);
         $post['blurb'] = html_entity_decode($post['blurb']);
         $post['href'] = $this->url->link('blog/post', 'ams_page_id=' . $post['id']);
         $data['posts'][] = $post;
     }
     $this->data = $data;
     $this->template = 'module/blog_latest.phtml';
     return $this->render();
 }
function send_file($name)
{
    OB_END_CLEAN();
    $path = $name;
    //"../temp/".$name;
    if (!IS_FILE($path) or CONNECTION_STATUS() != 0) {
        return FALSE;
    }
    HEADER("Cache-Control: no-store, no-cache, must-revalidate");
    HEADER("Cache-Control: post-check=0, pre-check=0", FALSE);
    HEADER("Pragma: no-cache");
    HEADER("Expires: " . GMDATE("D, d M Y H:i:s", MKTIME(DATE("H") + 2, DATE("i"), DATE("s"), DATE("m"), DATE("d"), DATE("Y"))) . " GMT");
    HEADER("Last-Modified: " . GMDATE("D, d M Y H:i:s") . " GMT");
    HEADER("Content-Type: application/octet-stream");
    HEADER("Content-Length: " . (string) FILESIZE($path));
    HEADER("Content-Disposition: inline; filename={$name}");
    HEADER("Content-Transfer-Encoding: binary\n");
    if ($file = FOPEN($path, 'rb')) {
        while (!FEOF($file) and CONNECTION_STATUS() == 0) {
            print FREAD($file, 1024 * 8);
            FLUSH();
        }
        FCLOSE($file);
    }
    return CONNECTION_STATUS() == 0 and !CONNECTION_ABORTED();
}
Example #3
0
 function display($tpl = null)
 {
     $mainframe = JFactory::getApplication();
     $option = JRequest::getCmd('option');
     $mypage = JFactory::getDocument();
     $mypage->setMetaData("EXPIRES", DATE(DATE_RFC1123, time() + 86400), true);
     $mypage->setMetaData("pragma", "no-cache", false);
     //get all topics, create select and assign to view
     $alltopics = JHTML::_('select.genericlist', $this->get('alltopics'), 'topic', 'style="width: 225px"', $key = 'id', $text = 'topic', JRequest::getString('topic', 'All'));
     $this->assignRef('alltopics', $alltopics);
     // get types, create select and assign to view
     $type = JHTML::_('select.genericlist', $this->get('alltypes'), 'type', 'style="width: 125px"', $key = 'id', $text = 'type', JRequest::getString('type', 'All'));
     $this->assignRef('types', $type);
     // get dates(years), create select and assign to view
     $years = JHTML::_('select.genericlist', $this->get('years'), 'year', 'style="width: 75px"', $key = 'id', $text = 'year', JRequest::getInt('year', 0));
     $this->assignRef('years', $years);
     $this->assign('query', $this->get('query'));
     $this->assignRef('rows', $this->get('data'));
     $this->assign('search', JRequest::getString('search', ''));
     $this->assignRef('pagination', $this->get('pagination'));
     $layout = JRequest::getVar('layout');
     if (!$layout) {
         JRequest::setVar('layout', 'default');
     }
     parent::display($tpl);
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_mainpage = 'products/index.tpl';
     $this->tpl_mainno = 'products';
     $this->tpl_subno = 'index';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = '商品管理';
     $this->tpl_subtitle = '商品マスター';
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPageMax = $masterData->getMasterData('mtb_page_max');
     $this->arrDISP = $masterData->getMasterData('mtb_disp');
     $this->arrSTATUS = $masterData->getMasterData('mtb_status');
     $this->arrPRODUCTSTATUS_COLOR = $masterData->getMasterData('mtb_product_status_color');
     $objDate = new SC_Date();
     // 登録・更新検索開始年
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrStartYear = $objDate->getYear();
     $this->arrStartMonth = $objDate->getMonth();
     $this->arrStartDay = $objDate->getDay();
     // 登録・更新検索終了年
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrEndYear = $objDate->getYear();
     $this->arrEndMonth = $objDate->getMonth();
     $this->arrEndDay = $objDate->getDay();
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     // GDライブラリのインストール判定
     $this->install_GD = function_exists('gd_info') ? true : false;
     $this->tpl_mainpage = 'total/index.tpl';
     $this->tpl_graphsubtitle = 'total/subtitle.tpl';
     $this->tpl_titleimage = ROOT_URLPATH . 'img/title/title_sale.jpg';
     $this->tpl_maintitle = $this->tpl_maintitle = t('c_Sales (history)_01');
     $this->tpl_mainno = 'total';
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrWDAY = $masterData->getMasterData('mtb_wday');
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrJob = $masterData->getMasterData('mtb_job');
     // 登録・更新日検索用
     $objDate = new SC_Date_Ex();
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrYear = $objDate->getYear();
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     // ページタイトル todo あとでなおす
     $this->arrTitle[''] = t('c_Sales by period_01');
     $this->arrTitle['term'] = t('c_Sales by period_01');
     $this->arrTitle['products'] = t('c_Sales by product_01');
     $this->arrTitle['age'] = t('c_Sales by age group_01');
     $this->arrTitle['job'] = t('c_Sales  by occupation_01');
     $this->arrTitle['member'] = t('c_Sales by member_01');
     // 月度集計のkey名
     $this->arrSearchForm1 = array('search_startyear_m', 'search_startmonth_m');
     // 期間別集計のkey名
     $this->arrSearchForm2 = array('search_startyear', 'search_startmonth', 'search_startday', 'search_endyear', 'search_endmonth', 'search_endday');
 }
Example #6
0
 /**
  * Page を初期化する.
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     $this->tpl_mainpage = 'order/index.tpl';
     $this->tpl_mainno = 'order';
     $this->tpl_subno = 'index';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = '受注管理';
     $this->tpl_subtitle = '受注管理';
     $masterData = Application::alias('eccube.db.master_data');
     $this->arrORDERSTATUS = $masterData->getMasterData('mtb_order_status');
     $this->arrORDERSTATUS_COLOR = $masterData->getMasterData('mtb_order_status_color');
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrPageMax = $masterData->getMasterData('mtb_page_max');
     /* @var $objDate Date */
     $objDate = Application::alias('eccube.date');
     // 登録・更新日検索用
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrRegistYear = $objDate->getYear();
     // 生年月日検索用
     $objDate->setStartYear(BIRTH_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrBirthYear = $objDate->getYear();
     // 月日の設定
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     // 支払い方法の取得
     $this->arrPayments = Application::alias('eccube.helper.payment')->getIDValueList();
     $this->httpCacheControl('nocache');
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     $this->tpl_mainpage = 'customer/index.tpl';
     $this->tpl_mainno = 'customer';
     $this->tpl_subno = 'index';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = '会員管理';
     $this->tpl_subtitle = '会員マスター';
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPref = $masterData->getMasterData('mtb_pref');
     $this->arrJob = $masterData->getMasterData('mtb_job');
     $this->arrJob['不明'] = '不明';
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrPageMax = $masterData->getMasterData('mtb_page_max');
     $this->arrStatus = $masterData->getMasterData('mtb_customer_status');
     $this->arrMagazineType = $masterData->getMasterData('mtb_magazine_type');
     // 日付プルダウン設定
     $objDate = new SC_Date_Ex();
     // 登録・更新日検索用
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrRegistYear = $objDate->getYear();
     // 生年月日検索用
     $objDate->setStartYear(BIRTH_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrBirthYear = $objDate->getYear();
     // 月日の設定
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     // カテゴリ一覧設定
     $objDb = new SC_Helper_DB_Ex();
     $this->arrCatList = $objDb->sfGetCategoryList();
     $this->httpCacheControl('nocache');
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_mainpage = 'products/review.tpl';
     $this->tpl_mainno = 'products';
     $this->tpl_subno = 'review';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = '商品管理';
     $this->tpl_subtitle = 'レビュー管理';
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPageMax = $masterData->getMasterData("mtb_page_max");
     $this->arrRECOMMEND = $masterData->getMasterData("mtb_recommend");
     $this->arrSex = $masterData->getMasterData("mtb_sex");
     $objDate = new SC_Date_Ex();
     // 登録・更新検索開始年
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrStartYear = $objDate->getYear();
     $this->arrStartMonth = $objDate->getMonth();
     $this->arrStartDay = $objDate->getDay();
     // 登録・更新検索終了年
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrEndYear = $objDate->getYear();
     $this->arrEndMonth = $objDate->getMonth();
     $this->arrEndDay = $objDate->getDay();
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_mainpage = 'order/index.tpl';
     $this->tpl_mainno = 'order';
     $this->tpl_subno = 'index';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = t('c_Orders_01');
     $this->tpl_subtitle = t('c_Order master_01');
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrORDERSTATUS = $masterData->getMasterData('mtb_order_status');
     $this->arrORDERSTATUS_COLOR = $masterData->getMasterData('mtb_order_status_color');
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrPageMax = $masterData->getMasterData('mtb_page_max');
     $objDate = new SC_Date_Ex();
     // 登録・更新日検索用
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrRegistYear = $objDate->getYear();
     // 生年月日検索用
     $objDate->setStartYear(BIRTH_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrBirthYear = $objDate->getYear();
     // 月日の設定
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     // 支払い方法の取得
     $this->arrPayments = SC_Helper_DB_Ex::sfGetIDValueList('dtb_payment', 'payment_id', 'payment_method');
     $this->httpCacheControl('nocache');
 }
Example #10
0
 /**
  * Page を初期化する.
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     $this->tpl_mainpage = 'products/index.tpl';
     $this->tpl_mainno = 'products';
     $this->tpl_subno = 'index';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = '商品管理';
     $this->tpl_subtitle = '商品マスター';
     $masterData = Application::alias('eccube.db.master_data');
     $this->arrPageMax = $masterData->getMasterData('mtb_page_max');
     $this->arrDISP = $masterData->getMasterData('mtb_disp');
     $this->arrSTATUS = $masterData->getMasterData('mtb_status');
     $this->arrPRODUCTSTATUS_COLOR = $masterData->getMasterData('mtb_product_status_color');
     /* @var $objDate Date */
     $objDate = Application::alias('eccube.date');
     // 登録・更新検索開始年
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrStartYear = $objDate->getYear();
     $this->arrStartMonth = $objDate->getMonth();
     $this->arrStartDay = $objDate->getDay();
     // 登録・更新検索終了年
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrEndYear = $objDate->getYear();
     $this->arrEndMonth = $objDate->getMonth();
     $this->arrEndDay = $objDate->getDay();
 }
Example #11
0
 public static function CHECKOUTS($COST, $TAXABLE, $TAX, $USER, $M1, $M1COST, $M2, $M2COST, $PM = '+', $D = '')
 {
     if ($D == '') {
         $D = DATE("Y-m-d");
     } else {
         $D = EXPLODE(" ", $D);
         $D = $D[0];
     }
     $CASH = 0;
     $CHECK = 0;
     $AMEX = 0;
     $DISCOVER = 0;
     $MASTER = 0;
     $VISA = 0;
     $DEBIT = 0;
     if ($M1 == "Cash") {
         $CASH += $M1COST;
     }
     if ($M2 == "Cash") {
         $CASH += $M2COST;
     }
     if ($M1 == "Check") {
         $CHECK += $M1COST;
     }
     if ($M2 == "Check") {
         $CHECK += $M2COST;
     }
     if ($M1 == "American Express") {
         $AMEX += $M1COST;
     }
     if ($M2 == "American Express") {
         $AMEX += $M2COST;
     }
     if ($M1 == "Discover") {
         $DISCOVER += $M1COST;
     }
     if ($M2 == "Discover") {
         $DISCOVER += $M2COST;
     }
     if ($M1 == "MasterCard") {
         $MASTER += $M1COST;
     }
     if ($M2 == "MasterCard") {
         $MASTER += $M2COST;
     }
     if ($M1 == "Visa") {
         $VISA += $M1COST;
     }
     if ($M2 == "Visa") {
         $VISA += $M2COST;
     }
     if ($M1 == "Debit Card") {
         $DEBIT += $M1COST;
     }
     if ($M2 == "Debit Card") {
         $DEBIT += $M2COST;
     }
     $QUERY = "INSERT INTO core_stores_daily_checkouts (s_id, d_key, d_gross_nontaxable, d_gross_taxable, d_tax, d_cash, d_check, d_amex, d_discover, d_master, d_visa, d_debit, d_date) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)\n\t\t ON DUPLICATE KEY UPDATE d_key=d_key" . $PM . "1,d_gross_nontaxable=d_gross_nontaxable" . $PM . "?,d_gross_taxable=d_gross_taxable" . $PM . "?,d_tax=d_tax" . $PM . "?,d_cash=d_cash" . $PM . "?,d_check=d_check" . $PM . "?,d_amex=d_amex" . $PM . "?,d_discover=d_discover" . $PM . "?,d_master=d_master" . $PM . "?,d_visa=d_visa" . $PM . "?,d_debit=d_debit" . $PM . "?";
     MYSQL::QUERY($QUERY, array($USER['store'], 1, $COST, $TAXABLE, $TAX, $CASH, $CHECK, $AMEX, $DISCOVER, $MASTER, $VISA, $DEBIT, $D, $COST, $TAXABLE, $TAX, $CASH, $CHECK, $AMEX, $DISCOVER, $MASTER, $VISA, $DEBIT));
 }
Example #12
0
 /**
  * Page を初期化する.
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     $this->tpl_mainpage = 'products/review.tpl';
     $this->tpl_mainno = 'products';
     $this->tpl_subno = 'review';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = '商品管理';
     $this->tpl_subtitle = 'レビュー管理';
     $masterData = Application::alias('eccube.db.master_data');
     $this->arrPageMax = $masterData->getMasterData('mtb_page_max');
     $this->arrRECOMMEND = $masterData->getMasterData('mtb_recommend');
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     /* @var $objDate Date */
     $objDate = Application::alias('eccube.date');
     // 登録・更新検索開始年
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrStartYear = $objDate->getYear();
     $this->arrStartMonth = $objDate->getMonth();
     $this->arrStartDay = $objDate->getDay();
     // 登録・更新検索終了年
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrEndYear = $objDate->getYear();
     $this->arrEndMonth = $objDate->getMonth();
     $this->arrEndDay = $objDate->getDay();
 }
Example #13
0
 /**
  * Page を初期化する.
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     // GDライブラリのインストール判定
     $this->install_GD = function_exists('gd_info') ? true : false;
     $this->tpl_mainpage = 'total/index.tpl';
     $this->tpl_graphsubtitle = 'total/subtitle.tpl';
     $this->tpl_titleimage = ROOT_URLPATH . 'img/title/title_sale.jpg';
     $this->tpl_maintitle = '売上集計';
     $this->tpl_mainno = 'total';
     $masterData = Application::alias('eccube.db.master_data');
     $this->arrWDAY = $masterData->getMasterData('mtb_wday');
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrJob = $masterData->getMasterData('mtb_job');
     // 登録・更新日検索用
     /* @var $objDate Date */
     $objDate = Application::alias('eccube.date');
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrYear = $objDate->getYear();
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     // ページタイトル todo あとでなおす
     $this->arrTitle[''] = '期間別集計';
     $this->arrTitle['term'] = '期間別集計';
     $this->arrTitle['products'] = '商品別集計';
     $this->arrTitle['age'] = '年代別集計';
     $this->arrTitle['job'] = '職業別集計';
     $this->arrTitle['member'] = '会員別集計';
     // 月度集計のkey名
     $this->arrSearchForm1 = array('search_startyear_m', 'search_startmonth_m');
     // 期間別集計のkey名
     $this->arrSearchForm2 = array('search_startyear', 'search_startmonth', 'search_startday', 'search_endyear', 'search_endmonth', 'search_endday');
 }
 /**
  * Creates a new AnItems model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate()
 {
     $model = new AnItems();
     $NeccFunc = new NeccFunctions();
     // вибираємо головних батьків
     $parentCats = AnCats::find()->roots()->all();
     $list = $NeccFunc->getCorrectList($parentCats);
     // вибираємо регіони
     $regionsQuery = AnRegions::find()->asArray()->all();
     $regions = array();
     // формую правильний масив для select форми
     // хоча потрібно було б використати ArrayHelper::map($array, 'key', 'key')
     foreach ($regionsQuery as $region) {
         $regions[$region['id']] = $region['name'];
     }
     if ($model->load(Yii::$app->request->post())) {
         $model->created_at = DATE('Y-m-d H:i:s');
         $model->status = 0;
         $model->local = Yii::$app->language;
         $model->save();
         return $this->redirect('/announcement/anitems');
     } else {
         return $this->render('create', ['model' => $model, 'regions' => $regions, 'list' => $list]);
     }
 }
 public function inserirFichaCorreio($id_empresa, $id_usuario, $id_fichacorreio, $quantidade)
 {
     $data = DATE('Y-m-d');
     $this->table = 'vsites_emp_correios';
     $this->fields = array("id_empresa", "id_usuario", "id_fichacorreio", "quantidade", "data");
     $this->values = array("id_empresa" => $id_empresa, "id_usuario" => $id_usuario, "id_fichacorreio" => $id_fichacorreio, "quantidade" => $quantidade, "data" => $data);
     return $this->insert();
 }
Example #16
0
 public function index()
 {
     $this->load->language('marketing/newsletter/send');
     $this->document->setTitle($this->language->get('heading_title'));
     $this->load->model('marketing/newsletter');
     $this->load->model('marketing/newsletter/group');
     $data['groups'] = array();
     $data['groups'][0] = $this->language->get('text_all_members');
     $groups = $this->model_marketing_newsletter_group->getGroups();
     foreach ($groups as $group) {
         $data['groups'][$group['group_id']] = $group['group_name'];
     }
     $url = '';
     if (isset($this->request->get['sort'])) {
         $url .= '&sort=' . $this->request->get['sort'];
     }
     if (isset($this->request->get['order'])) {
         $url .= '&order=' . $this->request->get['order'];
     }
     if (isset($this->request->get['page'])) {
         $url .= '&page=' . $this->request->get['page'];
     }
     $this->document->addScript('view/plugins/datetimepicker/moment.min.js');
     $this->document->addScript('view/plugins/datetimepicker/bootstrap-datetimepicker.min.js');
     $this->document->addStyle('view/plugins/datetimepicker/bootstrap-datetimepicker.min.css');
     $data['action'] = $this->url->link('marketing/newsletter/send', 'newsletter_id=' . (int) $this->request->get['newsletter_id'] . '&token=' . $this->session->data['token'] . $url);
     $data['dont_send_duplicate'] = 0;
     $data['group_ids'] = array();
     $data['error_group_send_to'] = '';
     if (isset($this->request->post['send_later'])) {
         $data['send_later'] = $this->request->post['send_later'];
     } else {
         $data['send_later'] = DATE("Y-m-d H:i:s", time());
     }
     if ($this->request->server['REQUEST_METHOD'] == 'POST') {
         if (!isset($this->request->post['dont_send_duplicate'])) {
             $data['dont_send_duplicate'] = 0;
         }
         $data['group_ids'] = !empty($this->request->post['group_ids']) ? $this->request->post['group_ids'] : array();
         if (empty($data['group_ids'])) {
             $data['error_group_send_to'] = $this->language->get('error_group_send_to');
         } else {
             $post = array('group_ids' => $data['group_ids'], 'dont_send_duplicate' => $data['dont_send_duplicate'], 'send_later' => strtotime($data['send_later']));
             if ($post['send_later'] < time()) {
                 $post['send_later'] = time();
             }
             $newsletter_id = $this->request->get['newsletter_id'];
             if ($this->model_marketing_newsletter->createSend($newsletter_id, $post)) {
                 $this->redirect($this->url->link('marketing/newsletter/newsletter', 'token=' . $this->session->data['token'] . $url, 'SSL'));
             } else {
                 $data['error_group_send_to'] = $this->language->get('error_group_no_members');
             }
         }
     }
     $data['header'] = $this->getChild('common/header');
     $data['footer'] = $this->getChild('common/footer');
     $this->response->setOutput($this->render('marketing/newsletter/send.phtml', $data));
 }
function copyright_year($args = array())
{
    $year = DATE('Y');
    ob_start();
    ?>
	&copy; <?php 
    echo $year;
    return ob_get_clean();
}
Example #18
0
 public function index()
 {
     $output = DATE("c") . " Running Cron \n";
     $this->event->trigger('cron.run', $output);
     $logger = new \Core\Log("cron.log");
     $logger->write($output);
     echo $output;
     exit;
 }
 public function view()
 {
     $data = $this->db->query('SELECT * FROM cursussen WHERE einddatum > "' . DATE("Y-m-d") . '"');
     if ($data->num_rows() > 0) {
         foreach ($data->result() as $cursus) {
             $cursussen[] = $cursus;
         }
         return $cursussen;
     }
 }
Example #20
0
 private function initializeVars($template)
 {
     global $ASSETS, $PUBLIC_DIR;
     self::$vars['SITE_NAME'] = "Practice";
     self::$vars['template'] = $template == "index" ? " " : "| {$template}";
     # page title
     self::$vars['NOW'] = DATE('y-m-d');
     self::$vars['PUBLIC'] = $PUBLIC_DIR;
     self::$vars['ASSETS'] = $ASSETS;
 }
Example #21
0
 public function relFerias($dados)
 {
     $ferias = $this->feriasdao->relFerias($dados);
     if ($ferias > 0) {
         date_default_timezone_set('America/Sao_Paulo');
         //pega a data e hora
         $data_hora = DATE('d/m/Y H:i:s');
         $data_hora = explode(' ', $data_hora);
         $tam = sizeof($registro['result']);
         $i = 0;
         $logo = explode('/', $registro['logomarca'][0]['logomarca']);
         $logo = end($logo);
         $end = './webapps/img/logo_empresa/' . $logo;
         foreach ($ferias['result'] as $key => $row) {
             if (strlen($row['matricula_cpf']) > 10) {
                 $cpf = $row['matricula_cpf'];
                 $matricula_cpf = '';
             } else {
                 $cpf = '';
                 $matricula_cpf = $row['matricula_cpf'];
             }
             $div = '<div style="width:667px;">';
             // $div.= '<div style="width:640px;float: left;"><img src="http://localhost/gepp/webapps/img/logo_empresa/'.$logo.'"/></div>';
             $div .= '<div style="width:540px;float: left;"><img src="http://www.gepp.com.br/gepp/webapps/img/logo_empresa/' . $logo . '"/></div>';
             $div .= '<div style="width:125px;float: left;font-family: arial;font-size: 10;font-weight: bold;">' . $data_hora[1] . '&nbsp;&nbsp;&nbsp;' . $data_hora[0] . '</div>';
             $div .= '<br clear="all">';
             $div .= '<div style="width:667px;border:1px solid #000;">';
             $div .= '<div style="width:667px;font-family: arial;font-size: 14px;font-weight: bold;padding-top:2px;padding-left:3px;float:left;';
             $div .= 'background-color:#DCDCDC;text-align:center;">REGISTRO DE DOENÇA PROFISSIONAL</div>';
             $div .= '<div style="font-family: arial;font-size: 14px;padding-top:15px;padding-left:3px;float:left;">';
             $div .= '<div style="font-family: arial;font-size: 14px;padding-top:15px;padding-left:3px;float:left;width:100%;';
             $div .= '">Nome: <label style="margin-left:13px;">' . $row['nome'] . '</label></div>';
             $div .= '<div style="font-family: arial;font-size: 14px;padding-top:15px;padding-left:3px;float:left;width:150px;';
             $div .= '">CPF: <label style="margin-left:13px;">' . $cpf . '</label></div>';
             $div .= '<div style="font-family: arial;font-size: 14px;padding-top:15px;padding-left:3px;float:left;width:100px;';
             $div .= '">Matrícula: <label style="margin-left:13px;">' . $matricula_cpf . '</label></div>';
             $div .= '<div style="font-family: arial;font-size: 14px;padding-top:15px;padding-left:3px;float:left;width:100%;';
             $div .= '">Data Inicio Periodo Aquisitivo: <label style="margin-left:13px;">' . $row['data_inicio_perido'] . '</label></div>';
             $div .= '<div style="font-family: arial;font-size: 14px;padding-top:15px;padding-left:3px;float:left;width:100%;';
             $div .= '">Data Término Período Aquisitivo: <label style="margin-left:13px;">' . $row['data_fim_perido'] . '</label></div>';
             $div .= '<div style="font-family: arial;font-size: 14px;padding-top:15px;padding-left:3px;float:left;width:100%;';
             $div .= '">Data Inicio Gozo Férias: <label style="margin-left:13px;">' . $row['data_inicio_gozo'] . '</label></div>';
             $div .= '<div style="font-family: arial;font-size: 14px;padding-top:15px;padding-left:3px;float:left;width:100%;';
             $div .= '">Data Término Gozo Férias: <label style="margin-left:13px;">' . $row['data_fim_gozo'] . '</label></div>';
             $div .= '</div>';
             $div .= '</div>';
             $div .= '</div>';
             $this->pdf->AddPage();
             $this->pdf->WriteHTML($div);
         }
         $this->pdf->Output('relatorio_controle_ferias.pdf', 'D');
     } else {
         return 0;
     }
 }
Example #22
0
    function feed()
    {
        JRequest::setVar('tmpl', 'component');
        $project_id = JRequest::getVar('pid', 0);
        $project = $this->loadModel('JhProject');
        $versions = $this->loadModel('JhProjectVersion');
        if ($project_id != 0) {
            $project->load($project_id);
            $projectset = array($project->id => $project);
            $versionArray = $versions->fetchAll("project_id = '{$project_id}' and published = '1'", "release_date desc, id desc");
        } else {
            $projects = $project->fetchAll("published = '1'");
            $ids = array();
            $projectset = array();
            foreach ($projects as $project) {
                $ids[] = $project->id;
                $projectset[$project->id] = $project;
            }
            $versionArray = $versions->fetchAll("project_id in (" . implode(",", $ids) . ") and published = '1'", "release_date desc, id desc");
        }
        $c = new JConfig();
        $sitename = $c->sitename;
        $xml = '<?xml version="1.0" encoding="UTF-8"?>
		<rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
		<channel>
		<title>' . $sitename . '</title>
		<description />
		<link>' . JURI::base() . '</link>
		<lastBuildDate>' . DATE("r") . '</lastBuildDate>
		<generator>JHProject</generator>
		';
        $versionArray = array_slice($versionArray, 0, 10);
        // 		print_r($versionArray);
        //	print_r($projectset);
        foreach ($versionArray as $version) {
            $xml .= '
			<item>
				<title>' . $projectset[$version->project_id]->name . ': ' . $version->release_name . ' ' . $version->release_version . '</title>
				<link>' . JURI::base() . JRoute::_('index.php?option=com_jhproject&task=view&pid=' . $version->project_id) . '</link>
				<description>' . htmlentities($version->changelog) . '</description>
				<author>' . $projectset[$version->project_id]->developer_name . '</author>
				<pubDate>' . date("r", strtotime($version->release_date)) . '</pubDate>
				<guid isPermaLink="false">' . substr(JURI::base(), 0, -1) . JRoute::_('index.php?option=com_jhproject&task=view&pid=' . $version->project_id) . '</guid>
				<feedburner:origLink>' . substr(JURI::base(), 0, -1) . JRoute::_('index.php?option=com_jhproject&task=view&pid=' . $version->project_id) . '</feedburner:origLink>
			</item>';
        }
        $xml .= '</channel>
		</rss>';
        $mainframe =& JFactory::getApplication();
        echo $xml;
        $mainframe->close();
        // 		echo $xml;
        //print_r($project);
    }
Example #23
0
 public function add_log($table, $field_id, $action)
 {
     if (isset($_SESSION['user_id'])) {
         $loguser = $_SESSION['user_id'];
     } else {
         $loguser = "******";
     }
     //$sql="INSERT INTO `crm_log`(`user`, `table`,`field_id`,`action`, `time`) VALUES ('$loguser','$table','$field_id','$action',SYSDATE() )";
     //sql query
     DB::table('crm_log')->insert([['user' => $loguser, 'table' => $table, 'field_id' => $field_id, 'action' => $action, 'time' => DATE('Y-m-d H:i:s')]]);
     //sql query end
 }
Example #24
0
 public function submit()
 {
     $this->load->language('common/contact');
     if ($this->validate()) {
         unset($this->session->data['captcha']);
         $this->language->load('common/contact');
         $mail = new \Core\Mail();
         $mail->tags = array('Contact Request');
         $mail->mandrill_key = $this->config->get('config_mandrill_key');
         $mail->protocol = $this->config->get('config_mail_protocol');
         $mail->parameter = $this->config->get('config_mail_parameter');
         $mail->hostname = $this->config->get('config_mail_smtp_hostname');
         $mail->username = $this->config->get('config_mail_smtp_username');
         $mail->password = $this->config->get('config_mail_smtp_password');
         $mail->port = $this->config->get('config_mail_smtp_port');
         $mail->timeout = $this->config->get('config_mail_smtp_timeout');
         $post = $this->request->post;
         unset($post['custom_field']);
         $mailbody = "Contact form Submission \n";
         $mailbody .= $this->language->get('entry_name') . ": " . $this->request->post['name'] . "\n";
         $mailbody .= $this->language->get('entry_email') . ": " . $this->request->post['email'] . "\n";
         $mailbody .= $this->language->get('entry_enquiry') . ": " . $this->request->post['enquiry'] . "\n";
         $fields = $this->model_account_custom_field->getCustomFields();
         foreach ($fields as $cfield) {
             if ($cfield['location'] == 'contact') {
                 $mailbody .= $cfield['name'] . ": " . $this->request->post['custom_field'][$cfield['custom_field_id']] . "\n";
                 $post['custom_field'][$cfield['name']] = $this->request->post['custom_field'][$cfield['custom_field_id']];
             }
         }
         $mailbody .= "\n\n\n------------------------------------------\n";
         $mailbody .= "" . DATE("Y-m-d h:i a") . " | " . $this->request->server['REMOTE_ADDR'];
         $this->event->trigger('contact.form.submit.body', $mailbody);
         $mailsubject = sprintf($this->language->get('email_subject'), $this->request->post['name']);
         $this->event->trigger('contact.form.submit.subject', $mailsubject);
         $this->load->model('account/contact');
         $this->model_account_contact->addContact($post);
         $mail->setTo($this->config->get('config_email'));
         $mail->setFrom($this->config->get('config_email'));
         $mail->setSender($this->request->post['name']);
         $mail->setReplyTo($this->request->post['email']);
         $mail->setSubject($mailsubject);
         $mail->setText($mailbody);
         $mail->setHtml(nl2br($mailbody));
         $mail->send();
         $data['success'] = $this->language->get('text_success');
         //   $this->redirect($this->url->link('common/contact/success'));
     } else {
         $data['error'] = $this->error;
     }
     $this->response->addHeader('Content-Type: application/json');
     $this->response->setOutput(json_encode($data));
 }
 public function cadTreinamento($dados)
 {
     //verifica se existe a empresa cadastrada;
     $this->pdo->setCon();
     try {
         $con = $this->pdo->getCon();
         if ($con === null) {
             throw new PDOException();
         }
         //se conectou faz
         try {
             $con->beginTransaction();
             $sth = $con->prepare('INSERT INTO gepp_treinamento_realizado (id_efetivo,id_cargo,id_funcao,id_unidade,nome,carga_horaria,' . 'data,patrocinio,entidade_promotora,data_cadastro) VALUES (:id_efetivo,:id_cargo,:id_funcao,:id_unidade,:nome,' . ':carga_horaria,:data,:patrocinio,:entidade_promotora,:data_cadastro)');
             //seta os dados
             $id_efetivo = $dados['matricula_treinamento'];
             $id_cargo = $dados['cargoh'];
             $id_funcao = $dados['funcaoh'];
             $id_unidade = $dados['unidadeh'];
             $nome = $dados['nome_treinamento'];
             $carga_horaria = $dados['carga'];
             $data = $dados['data_realizacao'];
             $patrocinio = $dados['patrocinio'];
             $entidade_promotora = $dados['entidade'];
             $data_cadastro = DATE('Y-m-d');
             $sth->bindParam('id_efetivo', $id_efetivo, PDO::PARAM_INT);
             $sth->bindParam('id_cargo', $id_cargo, PDO::PARAM_INT);
             $sth->bindParam('id_funcao', $id_funcao, PDO::PARAM_INT);
             $sth->bindParam('id_unidade', $id_unidade, PDO::PARAM_INT);
             $sth->bindParam('nome', $nome, PDO::PARAM_STR);
             $sth->bindParam('carga_horaria', $carga_horaria, PDO::PARAM_STR);
             $sth->bindParam('data', $data, PDO::PARAM_STR);
             $sth->bindParam('patrocinio', $patrocinio, PDO::PARAM_STR);
             $sth->bindParam('entidade_promotora', $entidade_promotora, PDO::PARAM_STR);
             $sth->bindParam('data_cadastro', $data_cadastro, PDO::PARAM_STR);
             if ($sth->execute()) {
                 $con->commit();
                 $this->pdo->fechaCon();
                 return 1;
             } else {
                 throw new PDOException();
             }
             print_r($dados);
             exit;
         } catch (PDOException $e) {
             $con->rollback();
             $this->pdo->fechaCon();
             return -1;
         }
     } catch (PDOException $e) {
         return 0;
     }
 }
Example #26
0
 public function getIndex()
 {
     $m = DATE('m');
     if ($m >= 10) {
         $a = DATE('Y') . "-10-" . "01";
         $b = DATE('Y') + 1 . "-09-" . "30";
     } else {
         $a = DATE('Y') - 1 . "-10-" . "01";
         $b = DATE('Y') . "-09-" . "30";
     }
     $query_ReportHelp = $this->queryHelpdesk($a, $b);
     return View::make("report/report_helpdesk")->with(compact('query_ReportHelp'));
 }
 /**
  * @param string $file_name
  * @return boolean
  */
 public function upload($file_name)
 {
     $path = $this->_nuevoDirectorio();
     $config = array('upload_path' => $path, 'allowed_types' => 'gif|jpg|png|bmp|doc|docx|pdf|xls|xlsx|txt|ppt|pptx|csv', 'max_size' => '0', 'max_width' => '0', 'max_height' => '0');
     $this->upload = new CI_Upload($config);
     if (!$this->upload->do_upload($file_name)) {
         rmdir($path);
         $this->_error = $this->upload->display_errors();
         return false;
     } else {
         $data = $this->upload->data();
         $relative_path = str_replace(realpath(BASEPATH . "../"), "", realpath($data["full_path"]));
         $relative_path = substr($relative_path, 1, strlen($relative_path));
         $insert = array("arch_c_tamano" => $data["file_size"], "arch_c_nombre" => $relative_path, "arch_c_mime" => $data["file_type"], "arch_c_hash" => $this->_fileHash(), "arch_f_fecha" => DATE("Y-m-d H:i:s"), "usu_ia_id" => $this->session->userdata('session_idUsuario'));
         $this->_archivo_model->query()->insert($insert);
         return true;
     }
 }
Example #28
0
 public function cadAfastamentoLegal($dados)
 {
     //verifica se existe a empresa cadastrada;
     $this->pdo->setCon();
     try {
         $con = $this->pdo->getCon();
         if ($con === null) {
             throw new PDOException();
         }
         //se conectou faz a inserção
         try {
             $con->beginTransaction();
             $sth = $con->prepare('INSERT INTO gepp_afastamento_legal (id_efetivo,data_afastamento,motivo_afastamento,documento_comprobatorio,' . 'tempo_afastamento,data_retorno,data_cadastro) VALUES ' . '(:id_efetivo,:data_afastamento,:motivo_afastamento,:documento_comprobatorio,:tempo_afastamento,' . ':data_retorno,:data_cadastro)');
             //seta os dados
             $id_efetivo = $dados['id_efetivo'];
             $data_afastamento = $dados['data_afastamento'];
             $motivo_afastamento = $dados['motivo'];
             $documento_comprobatorio = $dados['doc_comprobatorio'];
             $tempo_afastamento = $dados['tempo_afastamento'];
             $data_retorno = $dados['data_retorno'];
             $data_cadastro = DATE('Y-m-d');
             $sth->bindParam('id_efetivo', $id_efetivo, PDO::PARAM_INT);
             $sth->bindParam('data_afastamento', $data_afastamento, PDO::PARAM_STR);
             $sth->bindParam('motivo_afastamento', $motivo_afastamento, PDO::PARAM_STR);
             $sth->bindParam('documento_comprobatorio', $documento_comprobatorio, PDO::PARAM_STR);
             $sth->bindParam('tempo_afastamento', $tempo_afastamento, PDO::PARAM_STR);
             $sth->bindParam('data_retorno', $data_retorno, PDO::PARAM_STR);
             $sth->bindParam('data_cadastro', $data_cadastro, PDO::PARAM_STR);
             if ($sth->execute()) {
                 $con->commit();
                 $this->pdo->fechaCon();
                 return 1;
             } else {
                 throw new PDOException();
             }
         } catch (PDOException $e) {
             $con->rollback();
             $this->pdo->fechaCon();
             return -1;
         }
     } catch (PDOException $e) {
         return 0;
     }
 }
 /**
  * 
  */
 public function guardar()
 {
     $this->load->library(array("module/noticias/noticias_validar"));
     header('Content-type: application/json');
     $request = new Zend_Controller_Request_Http();
     $params = $request->getParams();
     //print_r($params);
     if ($this->noticias_validar->esValido($params)) {
         $noticia = $this->_noticia_model->getById($params["id"]);
         if (is_null($noticia)) {
             $this->_noticia_model->insert(array("fecha" => DATE("Y-m-d H:i:s"), "nombre" => $params["titulo"], "descripcion" => $params["descripcion"], "id_usuario" => $this->session->userdata('session_idUsuario')));
         } else {
             $this->_noticia_model->update(array("nombre" => $params["titulo"], "descripcion" => $params["descripcion"]), $noticia->id);
         }
         echo json_encode(array("error" => $this->noticias_validar->getErrores(), "correcto" => true));
     } else {
         echo json_encode(array("error" => $this->noticias_validar->getErrores(), "correcto" => false));
     }
 }
Example #30
0
 public function index()
 {
     $content = "<div class = 'about'>";
     $content .= "<div class = 'logo'>";
     $content .= "<a href='http://ivanbragatto.byethost24.com'><img src='/css/images/logo_mouvement_blue_BG_black_IB_gray_EB_soft_upper_left_border.png' alt='IBweb' width='175px'></a>";
     $content .= "</div>";
     $content .= "<div class = 'message'>";
     $content .= "<p><h2>AEC Foyer Lataste CSS Management System</h2>";
     $content .= "<p>";
     $content .= "<p>Only AEC-Foyer Lataste employees are authorized to use this Management System";
     $content .= "<p>Only the webmaster can and should make internal changes, otherwise he cannot be held accountable in case the system does not perform as expected";
     $content .= "<p>";
     $current_year = DATE('Y');
     $content .= "<p>Copyright {$current_year} - AEC Foyer Lataste - developed by <a href='ivanbragatto.byethost24.com'>IBweb</a>";
     $content .= "</div>";
     $content .= "</div>";
     $output['content'] = $content;
     return $output;
 }