function addPromotion($pmtId = null, $pmtaId = null) { $this->path[] = array('text' => __('促销规则选择')); $oPromotion =& $this->system->loadModel('trading/promotion'); $oPromotionActivity =& $this->system->loadModel('trading/promotionActivity'); if (!$pmtaId) { $aTmp = $oPromotion->getPromotionFieldById($pmtId, array('pmta_id')); $pmtaId = $aTmp['pmta_id']; } $_SESSION['SWP_PROMOTION'] = NULL; $_SESSION['SWP_PROMOTION']['activityInfo'] = $oPromotionActivity->getActivityById($pmtaId); $_SESSION['SWP_PROMOTION']['activityInfo']['pmta_time_begin'] = dateFormat($_SESSION['SWP_PROMOTION']['activityInfo']['pmta_time_begin']); $_SESSION['SWP_PROMOTION']['activityInfo']['pmta_time_end'] = dateFormat($_SESSION['SWP_PROMOTION']['activityInfo']['pmta_time_end']); if ($pmtId) { $aData = $oPromotion->getPromotionFieldById($pmtId, array('*')); //echo "<pre>";print_r($aData);exit; $_SESSION['SWP_PROMOTION']['writePromotionRule'] = array('pmt_solution' => unserialize($aData['pmt_solution']), 'pmt_ifcoupon' => $aData['pmt_ifcoupon'], 'pmt_time_begin' => dateFormat($aData['pmt_time_begin']), 'pmt_time_end' => dateFormat($aData['pmt_time_end']), 'pmt_describe' => $aData['pmt_describe']); $_SESSION['SWP_PROMOTION']['selectPromotionRule']['pmts_id'] = $aData['pmts_id']; $_SESSION['SWP_PROMOTION']['selectProduct']['pmt_bond_type'] = $aData['pmt_bond_type']; switch ($aData['pmt_bond_type']) { case 1: $_SESSION['SWP_PROMOTION']['selectProduct']['bind_goods'] = $oPromotion->getBondGoods($pmtId); break; case 2: break; case 0: default: break; } } $_SESSION['SWP_PROMOTION']['basic']['pmta_id'] = $pmtaId; $_SESSION['SWP_PROMOTION']['basic']['pmt_id'] = $pmtId; $this->selectPromotionRule($pmtId); }
function addCoupon($cpnsId = null) { $this->path[] = array('text' => __('优惠券内容')); $_SESSION['SWP_PROMOTION'] = null; if ($cpnsId != null) { $this->pagedata['ediateable'] = 'true'; $oCoupon =& $this->system->loadModel('trading/coupon'); $oPromotion =& $this->system->loadModel('trading/promotion'); $aData = $oCoupon->getCouponById($cpnsId); $_SESSION['SWP_PROMOTION']['couponInfo'] = array('cpns_name' => $aData['cpns_name'], 'cpns_prefix' => substr($aData['cpns_prefix'], 1), 'cpns_status' => $aData['cpns_status'], 'cpns_type' => $aData['cpns_type']); $_SESSION['SWP_PROMOTION']['writePromotionRule'] = array('pmt_solution' => unserialize($aData['pmt_solution']), 'pmt_ifcoupon' => $aData['pmt_ifcoupon'], 'pmt_time_begin' => dateFormat($aData['pmt_time_begin']), 'pmt_time_end' => dateFormat($aData['pmt_time_end']), 'pmt_describe' => $aData['pmt_describe']); $_SESSION['SWP_PROMOTION']['selectPromotionRule']['pmts_id'] = $aData['pmts_id']; $_SESSION['SWP_PROMOTION']['selectProduct']['pmt_bond_type'] = $aData['pmt_bond_type']; switch ($aData['pmt_bond_type']) { case 1: $_SESSION['SWP_PROMOTION']['selectProduct']['bind_goods'] = $oPromotion->getBondGoods($aData['pmt_id']); break; case 2: break; case 0: default: break; } $_SESSION['SWP_PROMOTION']['basic']['cpns_id'] = $cpnsId; $_SESSION['SWP_PROMOTION']['basic']['pmt_id'] = $aData['pmt_id']; } $this->couponInfo(); }
function viewInfoBlock() { //Custom Function from helpers.php $bdateview = dateFormat($_SESSION['loggedUser']['u_b_day']); echo '<div class="userInfoContainer"> <h3>My Page:</h3> <div class="userInfo"> <div class="profileImg"> <img src="css/images/man.jpg" alt="Profile Photo"/> </div> <div class="infoTest"> <div class="perfonalInfo"> <ul> <li><strong>First Name: </strong>' . $_SESSION['loggedUser']['u_f_name'] . '</li> <li><strong>Last Name: </strong>' . $_SESSION['loggedUser']['u_l_name'] . '</li> <li><strong>Birthday: </strong>' . $bdateview . '</li> </ul> </div> <div class="personalAbout"> <p><strong>About me:</strong></p> <div class="aboutText">' . $_SESSION['loggedUser']['u_about'] . '</div> </div> </div> </div> </div>'; }
function showAddGift($giftId = null) { $this->path[] = array('text' => '赠品内容页'); $oGift = $this->system->loadModel('trading/gift'); $oMember = $this->system->loadModel('member/member'); $this->pagedata['catList'] = $oGift->getTypeArr(); if (count($this->pagedata['catList']) < 1) { $this->splash('failed', 'index.php?ctl=sale/gift&act=showAddType', '缺少赠品类别,无法添加赠品。转到添加赠品类别'); } $aMemberLevelList = $oMember->getLevelList(false); foreach ($aMemberLevelList as $k => $v) { $aTmpMList[$v['member_lv_id']] = $v['name']; } $this->pagedata['mLev'] = $aTmpMList; if ($giftId) { $this->pagedata['gift'] = $oGift->getGiftById($giftId); $this->pagedata['gift']['limit_end_time'] = dateFormat($this->pagedata['gift']['limit_end_time']); $this->pagedata['gift']['limit_start_time'] = dateFormat($this->pagedata['gift']['limit_start_time']); $this->pagedata['gift']['mLev'] = explode(',', $this->pagedata['gift']['limit_level']); } else { $this->pagedata['gift']['giftcat_id'] = $aType[0][0]['giftcat_id']; $this->pagedata['gift']['shop_iffb'] = 1; $this->pagedata['gift']['ifrecommend'] = 1; $this->pagedata['gift']['limit_num'] = 1; $this->pagedata['gift']['orderlist'] = $oGift->getInitOrder(); } $this->page('sale/gift/addGift.html'); }
/** * @dataProvider allDataProvider * * @param Memo $memo */ public function testIndexOnLogined(Memo $memo) { if ($memo->user_id !== static::$all->id_str) { return; } $this->visitWithLogined('/user/memo')->see('作成日時')->see($memo->created_at->format(dateFormat()))->see(autoLink($memo->content))->see('詳しく見る')->see("/memo/show/{$memo->id}")->see('編集')->see("/user/memo/edit/{$memo->id}")->see('削除')->see("/user/memo/delete/{$memo->id}"); }
function dateIsFuture($date) { if ($date = dateFormat($date)) { $date = substr($date, -4) . substr($date, 0, 2) . substr($date, 3, 2); if ($date >= date('Ymd')) { return true; } } return false; }
/** * @dataProvider userDataProvider * * @param string $sn */ public function testUser($sn) { $tmp = $this->memo->where('user_sn', $sn); $memos = $tmp->orderBy('id', 'desc')->paginate(10); $count = $tmp->count(); foreach ($memos as $memo) { $this->visit("/memo/user/{$memo->user_sn}")->see("@{$memo->user_sn}のメモ")->see("https://twitter.com/{$memo->user_sn}")->see($count)->see($memo->created_at->format(dateFormat()))->see($memo->user_sn)->see(autoLink($memo->content))->seeInfo()->assertResponseOk(); if ($count > 10) { $this->see("/memo/user/{$memo->user_sn}"); } } }
/** * Инициализация тизера. * * @global array $js_file * * @param array $options [kind, uid] */ public function init($options = array()) { if ($options) { $this->kind = (int) $options['kind']; $this->uid = (int) $options['uid']; } $this->data = array(); $tservices_binds = new tservices_binds($this->kind); $this->data['bind_up_price'] = $tservices_binds->getPrice(true, $this->uid); $this->data['date_stop'] = dateFormat('j', $this->date_stop) . ' ' . monthtostr(dateFormat('m', $this->date_stop), true); $this->data['allow_up'] = $this->allow_up; $this->data['tservice_id'] = $this->tservice_id; }
public function videoadd() { $this->view->assign('active', 'active'); if (isset($_GET['id'])) { $data = $this->models->get_video_id($_GET['id']); if ($data) { $data['created_date'] = dateFormat($data['created_date'], 'dd-mm-yyyy'); $data['posted_date'] = dateFormat($data['posted_date'], 'dd-mm-yyyy'); } $this->view->assign('data', $data); } $this->view->assign('admin', $this->admin['admin']); return $this->loadView('video/addvideo'); }
/** * Выводит дерево комментариев. Используется здесь и в xajax/contest.server.php * @param integer $pid id проекта * @param string $name название проекта * @param array $comments массив с деревом комментариев (подробнее в classes/contest.php) * @param boolean $comm_blocked автор отключил возможность оставлять комментарии? * @param boolean $project_end проект закрыт? * @param integer $s_level уровень вложенности комментария * @return string HTML с кнопками управления */ function comments($pid, $name, &$comments, $comm_blocked, $project_end, $s_level = 0) { global $stop_words, $contest, $project, $session; static $level = 0; $level = ($s_level ? $s_level : $level) + 1; $html = ''; $set_branch_as_read = false; for ($i = 0, $c = count($comments); $i < $c; $i++) { if (($comments[$i]['is_banned'] || $comments[$i]['usr_banned'] || $comments[$i]['user_blocked'] === 't') && !hasPermissions('projects') && !$contest->is_owner) { $msg = $msg2 = 'Ответ от заблокированного пользователя'; } else { if (!trim($comments[$i]['deleted'])) { $sMsg = $comments[$i]['moderator_status'] === '0' ? $stop_words->replace($comments[$i]['msg']) : $comments[$i]['msg']; $msg = reformat($sMsg, 30, 0, 0, 1); $msg2 = reformat($comments[$i]['msg'], 30, 0, 0, 1); } else { $msg2 = $msg = "Комментарий удален модератором"; if (hasPermissions("comments")) { $moderator = ''; $moderatorData = new users(); $moderatorData->GetUserByUID($comments[$i]['deluser_id']); if ($moderatorData->login) { $moderator = ' ' . $moderatorData->login . ' (' . $moderatorData->uname . ' ' . $moderatorData->usurname . ') '; } $msg2 = $msg = $msg . " {$moderator}"; } if ($comments[$i]['deluser_id'] == $comments[$i]['user_id']) { $msg2 = $msg = "Комментарий удален автором"; } else { if (trim($comments[$i]['deleted_reason']) && (hasPermissions("comments") || $comments[$i]['user_id'] == get_uid(false))) { $msg2 = $msg = $msg . "<div style='color:#ff0000'>Причина: " . $comments[$i]['deleted_reason'] . "</div>"; } } } } $a_is_banned = ($comments[$i]['is_banned'] || $comments[$i]['usr_banned']) && hasPermissions('projects'); $html .= "\n\t\t\t<li class='thread' id='thread-{$comments[$i]['id']}'" . ($level >= 9 ? " style='margin-left: 0'" : "") . ">\n\t\t\t\t<a name='c-comment-{$comments[$i]['id']}'></a>\n\t\t\t\t<div class='comment-one" . ($comments[$i]['deleted'] || $comments[$i]['hidden'] ? " comment-deleted" : "") . "' id='comment-{$comments[$i]['id']}'>\n\t\t\t\t\t<div class='contest-ea'>" . view_avatar($comments[$i]['login'], $comments[$i]['photo'], 1) . "</div>\n\t\t\t\t\t<div class='comment-body'>\n\t\t\t\t\t\t<h3 class='username'>" . $session->view_online_status($comments[$i]['login']) . "\n\t\t\t\t\t\t\t<a href='/users/{$comments[$i]['login']}' class='" . (is_emp($comments[$i]['role']) ? 'employer-name' : 'freelancer-name') . "'>{$comments[$i]['uname']} {$comments[$i]['usurname']} [{$comments[$i]['login']}]</a> " . view_mark_user($comments[$i]) . " " . ($comments[$i]['completed_cnt'] > 0 ? '<a href="/promo/bezopasnaya-sdelka/" title="Пользователь работал через Безопасную Сделку" target="_blank"><span class="b-icon b-icon__shield b-icon_top_1"></span></a>' : '') . "\n\t\t\t\t\t\t\t<span>[" . dateFormat('d.m.Y | H:i', $comments[$i]['post_date']) . "]</span>\n\t\t\t\t\t\t\t<span id='comment-modified-{$comments[$i]['id']}'>" . ($comments[$i]['modified'] ? "[изменен " . dateFormat('d.m.Y | H:i', $comments[$i]['modified']) . "]" : ' ') . "</span>\n\t\t\t\t\t\t\t" . ($a_is_banned ? "<b style=\"color:#ff0000\">Пользователь забанен</b>" : "") . "\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t" . ($_SESSION['uid'] && $comments[$i]['is_new'] ? "<p><img src='/images/mark-new.png' width='53' height='12' alt='новое' class='mark-new' /></p>" : "") . "\n\t\t\t\t\t\t<div id='comment-change-{$comments[$i]['id']}'>\n\t\t\t\t\t\t<p id='comment-msg-{$comments[$i]['id']}' " . ($a_is_banned ? "style='color:silver'" : "") . ".>" . $msg . "</p>\n\t\t\t\t\t\t<div id='comment-msg-original-{$comments[$i]['id']}' style='display:none'>" . $msg2 . "</div>\n\t\t\t\t\t\t<script type=\"text/javascript\">\n banned.addContext( 'p{$pid}c{$comments[$i]['id']}', 3, '" . HTTP_PREFIX . "{$_SERVER['HTTP_HOST']}" . getFriendlyURL("project", $pid) . "?comm={$comments[$i]['id']}#comment-{$comments[$i]['id']}', \"" . htmlspecialchars($name) . "\" );\n </script>\n\t\t\t\t\t\t<ul class='thread-options' id='comment-options-{$comments[$i]['id']}'>\n\t\t\t\t\t\t\t" . comment_options($pid, $comments[$i], $comm_blocked, $project_end, $level, $name) . "\n\t\t\t\t\t\t</ul>\n <div id='warnreason-" . $comments[$i]['id'] . "-" . $comments[$i]['user_id'] . "' style='display:none; padding: 0 0 5px 0px;'> </div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t" . (empty($comments[$i]['comments']) ? '' : '<ul>' . comments($pid, $name, $comments[$i]['comments'], $comm_blocked, $project_end) . '</ul>') . "\n\t\t\t</li>\n\t\t"; if ($comments[$i]['is_new']) { $set_branch_as_read = true; } } if ($set_branch_as_read) { $p = new projects(); $data = array("id" => $pid, "kind" => 7, "user_id" => $project["user_id"]); $p->SetRead($data, get_uid(false), true); } --$level; return $html; }
public function setAssignee($as){ $this->assigneeName = $as['assigneeName']; $asGender = $as['gender']; switch($asGender){ case 'M': $assigneeGender = 'Male'; break; case 'F': $assigneeGender = 'Female'; break; default: break; } $this->assigneeCostCenter = $as['costCenter']; $this->assigneeAge = $as['age']; $this->assigneecontactNo = $as['contactNo1'] . ' / ' . $as['contactNo2']; $this->assigneeAddress = $as['address']; $this->assigneeLicenseNo = $as['licenseNo']; $this->licenseExpirationDate = dateFormat($as['expirationDate'],"F d, Y"); }
public function addarticle() { $this->view->assign('active', 'active'); if (isset($_GET['id'])) { $data = $this->models->get_article_id($_GET['id']); if ($data) { $data['created_date'] = dateFormat($data['created_date'], 'dd-mm-yyyy'); $data['posted_date'] = dateFormat($data['posted_date'], 'dd-mm-yyyy'); $data['expired_date'] = dateFormat($data['expired_date'], 'dd-mm-yyyy'); } $this->view->assign('data', $data); } $this->view->assign('admin', $this->admin['admin']); return $this->loadView('article/inputarticle'); }
public function content() { $this->view->assign('active', 'active'); if (isset($_GET['cat']) and isset($_GET['type'])) { $data = $this->models->get_article_site($_GET['cat'], $_GET['type']); if (!empty($data['created_date']) || !empty($data['posted_date']) || !empty($data['expired_date'])) { $data['created_date'] = dateFormat($data['created_date'], 'dd-mm-yyyy'); $data['posted_date'] = dateFormat($data['posted_date'], 'dd-mm-yyyy'); $data['expired_date'] = dateFormat($data['expired_date'], 'dd-mm-yyyy'); } $this->view->assign('data', $data); } $this->view->assign('admin', $this->admin['admin']); return $this->loadView('site/inputdata'); }
function index() { $where = "category = '3' AND n_status = '1'"; $data = $this->models->getData(TRUE, '*', 'floraINA_digirepo', $where); //pr($data); if ($data) { foreach ($data as $key => $value) { $data[$key]['created_date'] = dateFormat($value['created_date'], 'article'); $data[$key]['content'] = html_entity_decode($value['content'], ENT_QUOTES, 'UTF-8'); } $this->view->assign('data', $data); } $this->view->assign('title', 'Publication'); return $this->loadView('publication/all'); }
function view() { $id = $_GET['id']; //Get all news $where = "id = '" . $id . "' AND n_status = '1'"; $data = $this->models->getData(TRUE, '*', 'floraINA_news_content', $where); if ($data) { foreach ($data as $key => $value) { $data[$key]['content'] = html_entity_decode($value['content'], ENT_QUOTES, 'UTF-8'); $data[$key]['posted_date'] = dateFormat($value['posted_date'], 'article'); } $this->view->assign('data', $data); } return $this->loadView('news/post_view'); }
function addCouponGenerate($cpnsId, $pmtId = null) { $_SESSION['SWP_PROMOTION'] = null; $oCoupon =& $this->system->loadModel('trading/coupon'); $oPromotion =& $this->system->loadModel('trading/promotion'); $_SESSION['SWP_PROMOTION']['couponInfo'] = $oCoupon->getCouponById($cpnsId); if ($pmtId != null) { $aData = $oPromotion->getPromotionFieldById($pmtId, array('*')); $_SESSION['SWP_PROMOTION']['writePromotionRule'] = array('pmt_solution' => unserialize($aData['pmt_solution']), 'pmt_ifcoupon' => $aData['pmt_ifcoupon'], 'pmt_time_begin' => dateFormat($aData['pmt_time_begin']), 'pmt_time_end' => dateFormat($aData['pmt_time_end']), 'pmt_describe' => $aData['pmt_describe']); $_SESSION['SWP_PROMOTION']['selectPromotionRule']['pmts_id'] = $aData['pmts_id']; $_SESSION['SWP_PROMOTION']['selectProduct']['pmt_bond_type'] = $aData['pmt_bond_type']; $_SESSION['SWP_PROMOTION']['basic']['pmt_id'] = $pmtId; } $_SESSION['SWP_PROMOTION']['basic']['cpns_id'] = $cpnsId; $this->selectPromotionRule(); }
function activityInfo($pmtaId = NULL) { $this->path[] = array('text' => __('促销活动内容')); $_SESSION['SWP_ACTIVITY'] = null; if (!empty($pmtaId) && intval($pmtaId) != 0) { $oPromotionActivity =& $this->system->loadModel('trading/promotionActivity'); $this->pagedata['pmta'] = $oPromotionActivity->getActivityById($pmtaId); $this->pagedata['pmta']['pmta_time_begin'] = dateFormat($this->pagedata['pmta']['pmta_time_begin']); $this->pagedata['pmta']['pmta_time_end'] = dateFormat($this->pagedata['pmta']['pmta_time_end']); $this->pagedata['_S']['act'] = 'edit'; } else { $this->pagedata['pmta']['pmta_enabled'] = 'true'; $this->pagedata['_S']['act'] = 'add'; } $this->page('sale/activity/activityInfo.html'); }
static function bookGet() { // Prepare Purchase Passengers $paxLead = ""; $coveredTravelers = []; foreach (self::$form['traveler'] as $key => $traveler) { $isLead = false; if (0 == $key) { $isLead = true; $paxLead = $traveler['nombre'] . ' ' . $traveler['apellido']; } $coveredTravelers[] = ['email' => "", 'code' => 'ADT', 'documents' => [['docType' => $traveler['tipoDocumento'], 'docId' => $traveler['numeroDocumento'], 'primary' => true]], 'lastName' => $traveler['apellido'], 'firstName' => $traveler['nombre'], 'birthDate' => dateFormat($traveler['anio_nac'] . '-' . $traveler['mes_nac'] . '-' . $traveler['dia_nac'], 'Y-m-d'), 'isLead' => $isLead]; } view()->share('paxLead', $paxLead); // Prepare Purchase Parameters $GulliverParameters = ['purchaseComments' => self::$form['comentarios'] . ' | Datos de fact:' . self::$form['domicilio'] . ' ' . self::$form['altura'] . ' ' . self::$form['piso'] . ' ' . self::$form['depto'] . ' (' . self::$form['localidad'] . ')-' . self::$form['clave'] . ':' . self::$form['cuil'], 'dateTo' => self::$search['dateTo'], 'onlinePurchase' => true, 'contactInfo' => ['firstName' => $coveredTravelers[0]['firstName'], 'lastName' => $coveredTravelers[0]['lastName'], 'email' => self::$form['email'], 'telephones' => [['telephoneType' => 'Home', 'phoneNumber' => self::$form['telefono']]]], 'emergencyContactsInfo' => [['firstName' => self::$form['emergencyContactsInfo']['name'], 'lastName' => self::$form['emergencyContactsInfo']['lastname'], 'email' => '', 'telephones' => [['telephoneType' => 'Home', 'phoneNumber' => self::$form['emergencyContactsInfo']['phone']]]]], 'sessionId' => self::$form['GID'], 'dateFrom' => self::$search['dateFrom'], 'isPromotion' => false, 'requestedCurrency' => self::$item['insuranceTotalPrices']['requestedPromotionalPrice']['currency'], 'purchasedPlans' => [['purchasePlanCode' => self::$item['insurancePlan']['code'], 'coveredTravelers' => $coveredTravelers, 'coveredDestination' => mb_convert_case(self::$search['destination'], MB_CASE_TITLE)]]]; // For testing proposes if (false == self::$testPNR) { $resp = Gulliver::BookingInsurance($GulliverParameters); } else { $resp = '{"data":{"dateTo":"2016-01-16","success":true,"bookingId":"N7IZZA","coveredTravelersCount":2,"sessionId":"64624cfb-9bf9-4b5d-8d29-bad8ee5c5bbe","dateFrom":"2016-01-15","requestedCurrency":"ARS","purchasedPlans":[{"insurancePlan":{"insuranceProvider":"TVA","name":"EuropeEUR30.000","description":"Europe30.000Euros","tripType":"SINGLE_TRIP","validTo":"2016-09-30T03:00:00Z","validFrom":"2013-10-01T03:00:00Z","code":"EUR30K","quotingUnit":"PER_DAY"},"coverages":[{"coverage":{"code":"CODE1","name":"Asistenciamédicaencasodeenfermedad","order":1.00,"priority":false},"detail":"HastaEUR30.000"},{"coverage":{"code":"CODE2","name":"Asistenciamédicaencasodeaccidente","order":2.00,"priority":false},"detail":"HastaEUR30.000"},{"coverage":{"code":"CODE3","name":"Asistenciamédicaencasodepre-existencia","order":3.00,"priority":false},"detail":"HastaEUR300"},{"coverage":{"code":"CODE4","name":"MedicamentosInternaciónoAmbulatorio","order":4.00,"priority":false},"detail":"HastaEUR1.000"},{"coverage":{"code":"CODE5","name":"OdontologÃÂa","order":5.00,"priority":false},"detail":"HastaEUR250"},{"coverage":{"code":"CODE6","name":"DÃÂascomplementariosporinternación","order":6.00,"priority":false},"detail":"2dÃÂas"},{"coverage":{"code":"CODE8","name":"SegurodeAccidentesPersonalesencasodemuerteaccidentalentrasportepúblico","order":8.00,"priority":false},"detail":"HastaUSD60.000"},{"coverage":{"code":"CODE9","name":"Compensaciónporpérdidadeequipajecomplementaria","order":9.00,"priority":false},"detail":"HastaEUR1.200"},{"coverage":{"code":"CODE11","name":"Gastosdehotelporconvalecencia","order":11.00,"priority":false},"detail":"HastaEUR500"},{"coverage":{"code":"CODE12","name":"Gastosdehotelfamiliaracompañante","order":12.00,"priority":false},"detail":"HastaEUR500"},{"coverage":{"code":"CODE13","name":"Anticipodefondosparafianza","order":13.00,"priority":false},"detail":"HastaEUR10.000"},{"coverage":{"code":"CODE14","name":"Transferenciadefondos","order":14.00,"priority":false},"detail":"HastaEUR2.000"},{"coverage":{"code":"CODE16","name":"GarantÃÂagastoscancelación/interrupciónc/restriccióndecausas(h/75años)","order":16.00,"priority":false},"detail":"HastaEUR1.000"},{"coverage":{"code":"CODE17","name":"Localizacióndeequipaje","order":17.00,"priority":false},"detail":"Incluido"},{"coverage":{"code":"CODE18","name":"Trasladodefamiliarencasodehospitalización","order":18.00,"priority":false},"detail":"Incluido"},{"coverage":{"code":"CODE19","name":"AsistenciaencasodeextravÃÂodedocumentos","order":19.00,"priority":false},"detail":"Incluido"},{"coverage":{"code":"CODE20","name":"Acompañamientodemenores","order":20.00,"priority":false},"detail":"Incluido"},{"coverage":{"code":"CODE21","name":"Viajederegresoporenfermedaddeltitular","order":21.00,"priority":false},"detail":"Incluido"},{"coverage":{"code":"CODE22","name":"Trasladosanitario","order":22.00,"priority":false},"detail":"Incluido"},{"coverage":{"code":"CODE23","name":"Repatriaciónsanitaria(incluidodentrodellÃÂmitedeasistenciamédica)","order":23.00,"priority":false},"detail":"Incluido"},{"coverage":{"code":"CODE24","name":"Trasladoderestos(incluidodentrodellÃÂmitedeasistenciamédica)","order":24.00,"priority":false},"detail":"Incluido"},{"coverage":{"code":"CODE25","name":"Transmisióndemensajesurgentes","order":25.00,"priority":false},"detail":"Incluido"},{"coverage":{"code":"CODE26","name":"LÃÂneadeconsultas24hs","order":26.00,"priority":false},"detail":"Incluido"},{"coverage":{"code":"CODE27","name":"Cúmuloporevento,accidenteconmúltiplesTitulares,aprorrata","order":27.00,"priority":false},"detail":"HastaEUR150.000"}],"insuranceTotalPrices":{"requestedPromotionalPrice":{"beforeTax":233.96,"afterTax":239.01,"currency":"ARS","taxes":[{"rate":0.105,"baseAmount":47.41,"name":"IVAGravadoal10.5%","amount":5.05,"code":"GRAVADO105","currencyCode":"ARS"}]},"requestedSellingPrice":{"beforeTax":310.91,"afterTax":324.12,"currency":"ARS","taxes":[{"rate":0.105,"baseAmount":124.36,"name":"IVAGravadoal10.5%","amount":13.21,"code":"GRAVADO105","currencyCode":"ARS"}]},"sellingPrice":{"beforeTax":16.00,"afterTax":16.68,"currency":"USD","taxes":[{"rate":0.105,"baseAmount":6.40,"name":"IVAGravadoal10.5%","amount":0.68,"code":"GRAVADO105","currencyCode":"USD"}]},"costPrice":{"beforeTax":9.60,"afterTax":9.60,"currency":"USD","taxes":[]},"currencyConversion":{"rateConversion":19.43,"requestedCurrency":"ARS","sourceCurrency":"USD"},"promotionalPrice":{"beforeTax":12.04,"afterTax":12.30,"currency":"USD","taxes":[{"rate":0.105,"baseAmount":2.44,"name":"IVAGravadoal10.5%","amount":0.26,"code":"GRAVADO105","currencyCode":"USD"}]}},"insurancePassengerPrice":[{"requestedPromotionalPrice":{"beforeTax":116.98,"afterTax":119.50,"currency":"ARS","taxes":[{"rate":0.105,"baseAmount":23.71,"name":"IVAGravadoal10.5%","amount":2.53,"code":"GRAVADO105","currencyCode":"ARS"}]},"requestedSellingPrice":{"beforeTax":155.45,"afterTax":162.06,"currency":"ARS","taxes":[{"rate":0.105,"baseAmount":62.18,"name":"IVAGravadoal10.5%","amount":6.61,"code":"GRAVADO105","currencyCode":"ARS"}]},"travelerAge":46,"sellingPrice":{"beforeTax":8.00,"afterTax":8.34,"currency":"USD","taxes":[{"rate":0.105,"baseAmount":3.20,"name":"IVAGravadoal10.5%","amount":0.34,"code":"GRAVADO105","currencyCode":"USD"}]},"costPrice":{"beforeTax":4.80,"afterTax":4.80,"currency":"USD","taxes":[]},"currencyConversion":{"rateConversion":19.43,"requestedCurrency":"ARS","sourceCurrency":"USD"},"promotionalPrice":{"beforeTax":6.02,"afterTax":6.15,"currency":"USD","taxes":[{"rate":0.105,"baseAmount":1.22,"name":"IVAGravadoal10.5%","amount":0.13,"code":"GRAVADO105","currencyCode":"USD"}]}},{"requestedPromotionalPrice":{"beforeTax":116.98,"afterTax":119.50,"currency":"ARS","taxes":[{"rate":0.105,"baseAmount":23.71,"name":"IVAGravadoal10.5%","amount":2.53,"code":"GRAVADO105","currencyCode":"ARS"}]},"requestedSellingPrice":{"beforeTax":155.45,"afterTax":162.06,"currency":"ARS","taxes":[{"rate":0.105,"baseAmount":62.18,"name":"IVAGravadoal10.5%","amount":6.61,"code":"GRAVADO105","currencyCode":"ARS"}]},"travelerAge":40,"sellingPrice":{"beforeTax":8.00,"afterTax":8.34,"currency":"USD","taxes":[{"rate":0.105,"baseAmount":3.20,"name":"IVAGravadoal10.5%","amount":0.34,"code":"GRAVADO105","currencyCode":"USD"}]},"costPrice":{"beforeTax":4.80,"afterTax":4.80,"currency":"USD","taxes":[]},"currencyConversion":{"rateConversion":19.43,"requestedCurrency":"ARS","sourceCurrency":"USD"},"promotionalPrice":{"beforeTax":6.02,"afterTax":6.15,"currency":"USD","taxes":[{"rate":0.105,"baseAmount":1.22,"name":"IVAGravadoal10.5%","amount":0.13,"code":"GRAVADO105","currencyCode":"USD"}]}}]}]},"audit":{"serverName":"gulliverdesa1","schemaRelease":"2012-05-2.16","productVersion":"master-InternalVersion","serverIp":"10.0.1.38","processTime":3262}}'; } // Check response if (false === $resp && true === Gulliver::$error) { return false; } // Decode the response $response = json_decode($resp, true); // Check for json error if (json_last_error() != JSON_ERROR_NONE) { return false; } else { unset($resp); } if (true == empty($response['data']['success'])) { return false; } // self::$response = $response['data']; unset($response); return true; }
function viewInfoBlock() { $checkIfAbout = $_SESSION['loggedUser']['u_about']; //Custom Function from helpers.php $bdateview = dateFormat($_SESSION['loggedUser']['u_b_day']); echo '<div class="panel panel-default"> <div class="panel-thumbnail profileImg"> <img src="css/images/man.jpg" class="img-responsive"> <p><strong>Name: </strong>' . $_SESSION['loggedUser']['u_f_name'] . ' ' . $_SESSION['loggedUser']['u_l_name'] . '</p> <p><strong>Birthday: </strong>' . $bdateview . '</p> </div> <div class="panel-body"> <p class="lead aboutMe">About me:</p>' . $checkIfAbout . '</div> </div>'; //If About me empty => PopUp modal "About me" window if (strlen($checkIfAbout) == 0) { echo '<!--post modal--> <div id="postModal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> About me: </div> <div class="modal-body"> <form class="form center-block"> <div class="form-group"> <textarea id="aboutMeEmpty" class="form-control input-lg" autofocus="" placeholder=""></textarea> </div> </form> </div> <div class="modal-footer"> <div> <button id="aboutSend" class="btn btn-primary btn-sm" data-dismiss="modal" aria-hidden="true">Send</button> </div> </div> </div> </div> </div>'; } }
public function index() { $this->view->assign('active', 'active'); $data = $this->models->get_article(1); if ($data) { foreach ($data as $key => $val) { $data[$key]['created_date'] = dateFormat($val['created_date'], 'article'); $data[$key]['posted_date'] = dateFormat($val['posted_date'], 'article'); if ($val['n_status'] == '1') { $data[$key]['n_status'] = 'Publish'; $data[$key]['status_color'] = 'green'; } else { $data[$key]['n_status'] = 'Unpublish'; $data[$key]['status_color'] = 'red'; } } } // pr($data);exit; $this->view->assign('data', $data); return $this->loadView('home'); }
public function setWO($wo){ $this->wo = null; $this->wo .= '<br /><br /><table width="1000px">'; $this->wo .= '<tr><td width="150"><b>WO Reference No: </b></td><td width="800">' . $wo['woReferenceNo'] . '</td></tr>'; $this->wo .= '<tr><td><b>WO Transaction Date: </b></td><td>' . dateFormat($wo['woTransactionDate'],"F d, Y h:i") . '</td></tr>'; $this->wo .= '<tr><td><b>Service Type: </b></td><td>' . $wo['serviceType'] . '</td></tr>'; $this->wo .= '<tr><td><b>Plate No: </b></td><td>' . $wo['plateNo'] . '</td></tr>'; $this->wo .= '<tr><td><b>Assignee: </b></td><td>' . $wo['assignee'] . '</td></tr>'; $this->wo .= '<tr><td><b>Meter: </b></td><td>' . $wo['meter'] . '</td></tr>'; $this->wo .= '<tr><td><b>Remarks: </b></td><td>' . $wo['remarks'] . '</td></tr>'; $this->wo .= '<tr><td><b>Is Warranty: </b></td><td>' . $wo['isWarrantyDesc'] . '</td></tr>'; $this->wo .= '<tr><td><b>Is Back Job: </b></td><td>' . $wo['isBackJobDesc'] . '</td></tr>'; $this->wo .= '<tr><td colspan="2"> </td><td>'; $this->wo .= '<tr><td><b>Labor: </b></td><td>' . number_format($wo['labor'],2) . '</td></tr>'; $this->wo .= '<tr><td><b>Miscellaneous: </b></td><td>' . number_format($wo['miscellaneous'],2) . '</td></tr>'; $this->wo .= '<tr><td><b>Parts: </b></td><td>' . number_format($wo['parts'],2) . '</td></tr>'; $this->wo .= '<tr><td><b>Discount: </b></td><td>' . number_format($wo['discount'],2) . '</td></tr>'; $this->wo .= '<tr><td><b>Tax(12%): </b></td><td>' . number_format($wo['tax'],2) . '</td></tr>'; $this->wo .= '<tr><td colspan="2"> </td><td>'; $this->wo .= '<tr><td><b>Total Cost: </b></td><td>' . number_format($wo['totalCost'],2) . '</td></tr>'; $this->wo .= '</table>'; }
function check_user_cookie($user_cookie) { $connection = connect(); $ps = $connection->prepare("select u_id, u_uID, u_email, u_pwd, u_f_name, u_l_name, u_b_day, u_gender, u_userName, u_about \n from auto_login as a\n left join users as u\n on u.u_id = a.a_u_id \n where a_u_hash = ? limit 1"); $ps->bind_param("s", $user_cookie); //string $ps->execute(); $ps->bind_result($u_id, $uuid, $email, $password, $firstName, $lastName, $date, $gender, $username, $about); $ps->fetch(); if (!$u_id) { return NULL; } if ($gender == 1) { $gender = 'male'; } else { $gender = 'female'; } //Custom date Formating d/m/Y function from helpers.php $date = dateFormat($date); $userSession = new stdClass(); $userSession->u_id = $u_id; $userSession->uuid = $uuid; $userSession->email = $email; $userSession->firstName = $firstName; $userSession->lastName = $lastName; $userSession->date = $date; $userSession->gender = $gender; $userSession->username = $username; $userSession->about = $about; //Add userData to Session helpers.php session_write($userSession); $ps->close(); $connection->close(); //Update User Cookie on client side and DB every time after cookie checking //update_user_cookies($u_id, $username, $email); return TRUE; }
/** * Check if a given date is valid and is between a minimum and a maximum period of time * @param (string) $date Date to validate in 'Y-m-d' format * @param (string) $min minimum time period * @param (string) $max maximum time period * @return (boolean) true on success, false on error **/ function dateValidate($date = "", $min = 'P1D', $max = 'P12M') { // Switch a date between formats $date = dateFormat($date, $format = 'Y-m-d'); // Check if we have a valid date $datetime = \DateTime::createFromFormat('Y-m-d', $date); if (!$date || $datetime && $datetime->format('Y-m-d') != $date) { return false; } // Calculate minimum date from today $mindate = new \DateTime(); $mindate = $mindate->add(new \DateInterval($min))->format('Y-m-d'); // Calculate maximum date from today $maxdate = new \DateTime(); $maxdate = $maxdate->add(new \DateInterval($max))->format('Y-m-d'); // Check if the date is between minimum and maximum dates if ($date < $mindate) { return 'min'; } if ($date > $maxdate) { return 'max'; } return true; }
</div> <div class="widget mars-videos-sidebar-widget"> <h4 class="widget-title">Most Liked videos</h4> <div class="row"> <?php foreach($liked->result as $val){ ?> <div class="col-xs-6 item mars-videos-sidebar-widget-2-1719"> <div class="item-img"> <a title="<?=$val->title ?>" href="<?php echo BASEURL.'play.php?id='.$val->id ?>"> <img width="165" height="108" src="<?=$val->thumbs->large ?>" class="img-responsive wp-post-image" alt="music2" /></a> <a href="<?php echo BASEURL.'play.php?id='.$val->id ?>"><div class="img-hover"></div></a> </div> <h3><a title="<?=$val->title ?>" href="<?php echo BASEURL.'play.php?id='.$val->id ?>"><?=$val->title ?></a></h3> <div class="meta"><span class="date"><?php echo dateFormat($v->created); ?></span> <span class="views"><i class="fa fa-eye"></i><?=$val->views ?></span><span class="heart"> <i class="fa fa-heart"></i><?=$val->likes ?></span> <span class="fcomments"><i class="fa fa-comments"></i><?=$val->comments ?></span> </div> </div> <?php } ?> </div> </div> </div><!-- /.sidebar --> </div><!-- /.row --> </div><!-- /.container --> <!-- /#footer --> <?php require_once('footer.php'); ?>
?> <tr> <td valign="top" align="left"><?php echo htmlentities($ordRow["order_id"]); ?> </td> <td valign="top" align="left"><?php echo printElement($ordRow["user_name"]); ?> </td> <td valign="top" align="left"><?php echo getOrderStatus($ordRow["order_id"]); ?> </td> <td valign="top" align="left"><?php echo dateFormat($ordRow["order_date"], "Y-m-d", "m/d/Y"); ?> </td> <td valign="top" align="left"><?php echo $adminSymbol; ?> <?php echo htmlentities(number_format($orderTotal, 2, '.', '')); ?> </td> <td><a href="<?php echo $link; ?> ">View</a></td> </tr>
include "../includes/session.php"; include "../includes/functions.php"; include_once '../classes/cls_products.php'; if (isset($_SESSION["sess_artistid"]) && $_SESSION["sess_artistid"] != "") { $artistid = $_SESSION["sess_artistid"]; } else { header("Location:login.php"); exit; } if (isset($_POST['gotoPage'])) { header("Location:" . $_SERVER['PHP_SELF'] . "?page=" . $_POST['gotoPage']); } $query_string1 = "?page=" . $_REQUEST['page']; if (isset($_POST['btnSubmit'])) { $from_date = dateFormat($_POST['txtFromDate'], "d-m-Y", "Y-m-d"); $to_date = dateFormat($_POST['txtToDate'], "d-m-Y", "Y-m-d"); $query_string = "AND o.order_date >= " . GetSQLValueString($from_date, "text") . " AND o.order_date <= " . GetSQLValueString($to_date, "text") . " "; $query_string1 .= '&txtFromDate=' . $_POST['txtFromDate']; $query_string1 .= '&txtToDate=' . $_POST['txtToDate']; } else { $query_string = ""; } //get orders $sql = "SELECT DISTINCT ot.* FROM " . $tableprefix . "order_tax ot\n\t\t\t\t\t\tINNER JOIN " . $tableprefix . "orders o ON ot.orderid = o.order_id\n INNER JOIN " . $tableprefix . "order_details od ON od.order_id = o.order_id\n WHERE o.vpayment_status ='C' AND od.artist_id = '" . mysql_real_escape_string($artistid) . "' " . $query_string . " ORDER BY o.order_id DESC"; //pagination if (!isset($pagenum)) { $pagenum = 1; } $limit = getSettingsValue('npagination_limit'); $page = isset($_GET['page']) ? trim($_GET['page']) : 1; if (empty($page)) {
function _process_data_for_daily_report($active_students_by_centre, $all_classes) { $class = array(); $start_time = strtotime('-15 days'); $end_time = strtotime(date('Y-m-d')); $interval_start = $start_time; $interval = 86400; foreach ($active_students_by_centre as $key => $class_date_number) { foreach ($class_date_number as $d) { $new[dateFormat($d->date)][$d->class_id][] = $d; $class[] = $key; } } foreach ($new as $key => $value) { foreach ($value as $key2 => $value2) { $new_array1[date('M j', strtotime($key))][$key2] = count($value2); } } ksort($new_array1); for ($i = $start_time + $interval; $i <= $end_time + 86400; $i += $interval) { $interval_end = $i; $interval_index = date('M j', $interval_end); foreach ($new as $key => $value) { foreach ($value as $key2 => $value2) { $new_array2[$interval_index][$key2] = 0; } } $interval_start = $i; } ksort($new_array2); $new_array3 = $this->array_union_recursive($new_array1, $new_array2); ksort($new_array3); foreach ($new_array3 as $key => $value) { $new_array[$key] = $value; } $class_array = array(); $class_names = array(); if (_is('Teacher')) { foreach ($all_classes as $value) { $class_array[$value->class_id] = 0; $class_names[] = $value->name; } } else { foreach ($all_classes as $value) { $class_array[$value->id] = 0; $class_names[] = $value->name; } } $final = array(); $date = array('Date'); $merged_array = array_merge($date, $class_names); $final_array[] = $merged_array; $intv = 86400; $start__time = strtotime('-16 days'); $end__ime = strtotime(date('Y-m-d')); for ($i = $start__time + $intv; $i <= $end__ime + 86400; $i += $intv) { $intv_end = $i; $intv_index = date('M j', $intv_end); foreach ($new_array as $key => $value) { $final[$intv_index] = array($intv_index); foreach ($class_array as $key2 => $value) { $final[$intv_index][$key2] = 0; } } $interval__start = $i; } $array_union = $this->array_union_recursive($new_array, $final); foreach ($array_union as $json_array) { $sortArray = $json_array; ksort($sortArray); $sorted = array(); foreach ($sortArray as $key => $value) { $sorted[] = $value; } $final_array[] = $sorted; } $final_array = $this->order_report_data($final_array); return $final_array; }
?> </td> <td align="left"><?php if ($row["discount"]) { echo $row["discount"]; } else { echo "-"; } ?> </td> <td align="left"><?php echo $link . htmlentities(stripslashes($row["category_name"])) . "</a>"; ?> </td> <td align="left"><?php echo $link . dateFormat($row["date_added"], "Y-m-d", "m/d/Y") . "</a>"; ?> </td> <td align="left"><?php echo $link . htmlentities($row["impression_count"]) . "</a>"; ?> </td> <?php if (getSettingsValue('product_listing_fee') > 0) { ?> <td align="left"><?php if ($row["payment_status"] != 'COMPLETED') { ?> <div class="hdr"> <a href="product-listing-payment.php?&pid=<?php echo $row["product_id"];
<th>Посещаемость:</th> <td><?php echo $additinfo['hits']; ?> </td> <td></td> </tr> <?php if ($user->birthday && $user->birthday > '1910-01-01') { ?> <tr> <th>Дата рождения:</th> <td> <?php echo dateFormat('d.m.y', $user->birthday); ?> (Возраст: <?php echo ElapsedYears(strtotimeEx($user->birthday)); ?> ) </td> <td></td> </tr> <?php } ?> <?php if ($val = $user->sex) { ?>
if ($key == 0) { $trackerPrimary = Tracker_Query::tracker($trackerId)->start($_REQUEST['start'][$key])->end($_REQUEST['end'][$key])->equals($_REQUEST['q'][$key])->search($_REQUEST['search'][$key])->fields($_REQUEST['fields'][$key])->status($_REQUEST['status'][$key])->query(); } else { $joinVars = $_REQUEST['itemIdFields'][$key - 1]; $joinVars = explode('|', $joinVars); $trackerPrimary = Tracker_Query::join_trackers($trackerPrimary, Tracker_Query::tracker($trackerId)->start($_REQUEST['start'][$key])->end($_REQUEST['end'][$key])->equals($_REQUEST['q'][$key])->search($_REQUEST['search'][$key])->fields($_REQUEST['fields'][$key])->status($_REQUEST['status'][$key])->query(), $joinVars[0], $joinVars[1]); } $i++; } } if (isset($_REQUEST['sortFieldIds']) == true) { Tracker_Query::arfsort($trackerPrimary, $_REQUEST['sortFieldIds']); } if (isset($_REQUEST['removeFieldIds']) == true || isset($_REQUEST['showFieldIds']) == true) { $trackerPrimary = Tracker_Query::filter_fields_from_tracker_query($trackerPrimary, $_REQUEST['removeFieldIds'], $_REQUEST['showFieldIds']); } if (isset($_REQUEST['dateFieldIds'])) { $trackerPrimary = dateFormat($_REQUEST['dateFieldIds'], $trackerPrimary); } $trackerPrimary = Tracker_Query::prepend_field_header($trackerPrimary, $_REQUEST['sortFieldNames']); if (isset($_REQUEST['time']) == true) { $endtime = microtime(); $endarray = explode(" ", $endtime); $endtime = $endarray[1] + $endarray[0]; $totaltime = $endtime - $starttime; $totaltime = round($totaltime, 5); echo "This page loaded in {$totaltime} seconds.\n\n\n"; } if ($_REQUEST['type'] == 'csv' && count($trackerPrimary) > 0) { print_r(Tracker_Query::to_csv($trackerPrimary)); }