当前位置: 首页>>代码示例>>PHP>>正文


PHP GetFlashMessages函数代码示例

本文整理汇总了PHP中GetFlashMessages函数的典型用法代码示例。如果您正苦于以下问题:PHP GetFlashMessages函数的具体用法?PHP GetFlashMessages怎么用?PHP GetFlashMessages使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GetFlashMessages函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Admin_Action_Default

 /**
  * Admin_Action_Default
  * This is the method that is run when an admin user views the addon.
  *
  * If there are no log entries to worry about, then it will show the 'Addon_systemlog_logs_empty' file from the templates/ folder
  * and then quickly return out of the function.
  *
  * If there are log entries to worry about, it will work out the paging for the top of the list
  * then show buttons to allow you to delete selected entries or delete all log entries at once
  *
  * If you want to view a particular log entry, click the '+' next to the relevant log summary and it will expand to show more detail
  *
  * @uses db
  * @uses template_system
  * @uses InterspireTemplate::GetTemplatePath()
  * @uses InterspireTemplate::SetTemplatePath()
  * @uses InterspireTemplate::ParseTemplate()
  * @uses InterspireTemplate::Assign()
  * @uses GetFlashMessages
  * @uses perpage
  * @uses show_max_pages
  * @uses admin_url
  * @uses GetId
  *
  * @return Void Instead of returning anything, the list of log entries (if any) are shown directly.
  */
 public function Admin_Action_Default()
 {
     $flash_messages = GetFlashMessages();
     $this->template_system->Assign('FlashMessages', $flash_messages, false);
     $number_of_logs = $this->db->FetchOne("SELECT count(logid) AS count FROM " . $this->db->TablePrefix . "log_system_system");
     if ($number_of_logs == 0) {
         $curr_template_dir = $this->template_system->GetTemplatePath();
         $this->template_system->SetTemplatePath(SENDSTUDIO_TEMPLATE_DIRECTORY);
         $GLOBALS['Error'] = GetLang('Addon_systemlog_Logs_Empty');
         $error = $this->template_system->ParseTemplate('errormsg', true);
         $this->template_system->SetTemplatePath($curr_template_dir);
         $this->template_system->Assign('Addon_systemlog_Logs_Empty', $error, false);
         $this->template_system->ParseTemplate('logs_empty');
         return;
     }
     $paging = $this->SetupPaging($this->admin_url, $number_of_logs);
     $this->template_system->Assign('Paging', $paging, false);
     $perpage = $this->GetPerPage();
     // paging always starts at '1' - so take one off so we get the right offset.
     $page_number = $this->GetCurrentPage() - 1;
     $offset = $page_number * $perpage;
     $qry = "SELECT logid, logseverity, logtype, logmodule, logsummary, logdate FROM " . $this->db->TablePrefix . "log_system_system ORDER BY logid DESC " . $this->db->AddLimit($offset, $perpage);
     $result = $this->db->Query($qry);
     $this->template_system->Assign('AddonId', $this->GetId());
     while ($row = $this->db->Fetch($result)) {
         $row['rowid'] = 'addon_' . $this->GetId() . '_' . $row['logid'];
         if ($row['logmodule'] === '') {
             $row['logmodule'] = 'Internal';
         }
         if (strlen($row['logsummary']) > 170) {
             $row['logsummary'] = substr($row['logsummary'], 0, 166) . ' ...';
         }
         $row['logsummary'] = htmlspecialchars($row['logsummary']);
         $row['logdate'] = gmdate('M d Y H:i:s', $row['logdate']);
         $image = 'error.gif';
         $severity = 'Error';
         switch ($row['logseverity']) {
             case 1:
                 $severity = 'Success';
                 $image = 'success.gif';
                 break;
             case 2:
                 $severity = 'Notice';
                 $image = 'notice.gif';
                 break;
             case 3:
                 $severity = 'Warning';
                 $image = 'warning.gif';
                 break;
         }
         $row['image'] = $image;
         $row['severity'] = $severity;
         $log_entries[] = $row;
     }
     $this->template_system->Assign('AdminUrl', $this->admin_url, false);
     $this->template_system->Assign('TemplateUrl', $this->template_url, false);
     $this->template_system->Assign('logsList', $log_entries, false);
     $this->template_system->ParseTemplate('logs_display');
 }
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:85,代码来源:systemlog.php

示例2: ManageFormFields

		public function ManageFormFields($msgDesc='', $msgStatus='')
		{
			if ($msgDesc !== '') {
				$GLOBALS['Message'] = MessageBox($msgDesc, $msgStatus);
			}

			$flashMessages = GetFlashMessages();

			if (is_array($flashMessages) && !empty($flashMessages)) {
				$GLOBALS['Message'] = '';
				foreach ($flashMessages as $flashMessage) {
					$GLOBALS['Message'] .= MessageBox($flashMessage['message'], $flashMessage['type']);
				}
			}

			$GLOBALS['FormFieldsGrid'] = $this->ManageFormFieldsGrid();
			$GLOBALS['FormFieldsAddField'] = sprintf(GetLang('FormFieldsAddField'), GetLang('FormFieldsSectionAccount'));
			$GLOBALS['FormFieldsOptions'] = '';
			$availableFields = $GLOBALS['ISC_CLASS_FORM']->getAvailableFields();

			if (is_array($availableFields)) {
				foreach ($availableFields as $name => $desc) {
					$GLOBALS['FormFieldsOptions'] .= '<li><a href="#" onclick="AddFormField(\'' . isc_html_escape($name) . '\'); return false;" style="background-image:url(\'images/fields/' . $desc['img'] . '\'); background-repeat:no-repeat; background-position:5px 5px; padding-left:28px; width:auto;">' . isc_html_escape($desc['name']) . '</a></li>';
				}
			}

			$GLOBALS['FormFieldsSectionAccount'] = sprintf(GetLang('FormFieldsSectionTab'), GetLang('FormFieldsSectionAccount'));
			$GLOBALS['FormFieldsSectionAddress'] = sprintf(GetLang('FormFieldsSectionTab'), GetLang('FormFieldsSectionAddress'));

			$GLOBALS['FormFieldsAccountFormId'] = FORMFIELDS_FORM_ACCOUNT;
			$GLOBALS['FormFieldsAddressFormId'] = FORMFIELDS_FORM_ADDRESS;

			if(!gzte11(ISC_MEDIUMPRINT)) {
				$GLOBALS['HideFormFieldsButtons'] = 'display: none';
			}

			$GLOBALS['FormFieldsHideAddButton'] = '';
			if (!$GLOBALS["ISC_CLASS_ADMIN_AUTH"]->HasPermission(AUTH_Add_FormFields) || !gzte11(ISC_MEDIUMPRINT)) {
				$GLOBALS['FormFieldsHideAddButton'] = 'none';
			}

			$GLOBALS['FormFieldsHideDeleteButton'] = '';
			if (!$GLOBALS["ISC_CLASS_ADMIN_AUTH"]->HasPermission(AUTH_Delete_FormFields) || !gzte11(ISC_MEDIUMPRINT)) {
				$GLOBALS['FormFieldsHideDeleteButton'] = 'none';
			}

			$GLOBALS['FormFieldsIsSortable'] = '';
			if ($GLOBALS["ISC_CLASS_ADMIN_AUTH"]->HasPermission(AUTH_Manage_FormFields)) {
				$GLOBALS['FormFieldsIsSortable'] = '1';
			}

			$this->template->display('formfields.manage.tpl');
		}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:53,代码来源:class.formfields.php

示例3: Admin_Action_Templates_Default

 /**
  * Admin_Action_Templates_Default
  * Prints the list of templates
  *
  * @return Void Returns nothing
  */
 public function Admin_Action_Templates_Default()
 {
     $api = self::getApi();
     $user = GetUser();
     /**
      * Add the add button and print flash messages
      */
     $this->template_system->Assign('Add_Button', $this->template_system->ParseTemplate('add_survey_template_button', true), false);
     $this->template_system->Assign('Message', GetFlashMessages(), false);
     /**
      * If there are no templates print an empty message
      */
     $numsurveys = $api->GetTemplates($user->userid, 0, 0, array(), array(), true);
     if ($numsurveys == 0) {
         $this->template_system->ParseTemplate('manage_templates_empty');
         return;
     }
     /**
      * The default sort details
      */
     $sort_details = array('SortBy' => 'name', 'Direction' => 'asc');
     /**
      * If valid sorting details are given overwrite the defaults
      */
     if (isset($_GET['SortBy']) && in_array(strtolower($_GET['SortBy']), $api->validSorts)) {
         $sort_details['SortBy'] = strtolower($_GET['SortBy']);
     }
     if (in_array(strtolower($_GET['Direction']), array('up', 'down'))) {
         $direction = strtolower($_GET['Direction']);
         if ($direction == 'up') {
             $sort_details['Direction'] = 'asc';
         } else {
             $sort_details['Direction'] = 'desc';
         }
     }
     $perpage = $this->GetPerPage();
     if (isset($_GET['PerPageDisplay'])) {
         $perpage = (int) $_GET['PerPageDisplay'];
         $this->SetPerPage($perpage);
     }
     $page = (int) $_GET['DisplayPage'];
     if ($page < 1) {
         $page = 1;
     }
     $paging = $this->SetupPaging($this->admin_url, $numsurveys);
     $this->template_system->Assign('Paging', $paging, false);
     $search_info = array();
     $surveys = $api->GetTemplates($user->userid, $page, $perpage, $search_info, $sort_details, false);
     $survey_rows = '';
     foreach ($surveys as $survey) {
         $this->template_system->Assign('name', $survey['name']);
         $this->template_system->Assign('surveyid', $survey['surveyid']);
         $this->template_system->Assign('created', AdjustTime($survey['created'], false, GetLang('DateFormat'), true));
         /**
          * add the edit link
          */
         $editlink = '<a href="' . $this->admin_url . '&Action=Edit&id=' . $survey['surveyid'] . '">' . GetLang('Edit') . '</a>';
         $this->template_system->Assign('edit_link', $editlink, false);
         /**
          * add the delete link
          */
         $deletelink = '<a href="' . $this->admin_url . '&Action=Delete&id=' . $survey['surveyid'] . '">' . GetLang('Delete') . '</a>';
         $this->template_system->Assign('delete_link', $deletelink, false);
         $survey_rows .= $this->template_system->ParseTemplate('manage_surveys_row', true);
     }
     $this->template_system->Assign('Items', $survey_rows, false);
     $this->template_system->ParseTemplate('templates_manage');
 }
开发者ID:hungnv0789,项目名称:vhtm,代码行数:74,代码来源:survey_templates.php

示例4: EditCustomerStep1

		/**
		 * Edit a customer page
		 *
		 * Method will construct the edit customer page
		 *
		 * @access public
		 * @param string $MsgDesc The optional message to display
		 * @param string $MsgStatus The optional status of the message
		 * @param bool $PreservePost TRUE to use the REQUEST variable, FALSE to read from the database. Default is FALSE
		 * @return Void
		 */
		public function EditCustomerStep1($MsgDesc = "", $MsgStatus = "", $PreservePost=false)
		{
			if ($MsgDesc != "") {
				$GLOBALS['Message'] = MessageBox($MsgDesc, $MsgStatus);
			}

			$flashMessages = GetFlashMessages();
			if(is_array($flashMessages) && !empty($flashMessages)) {
				$GLOBALS['Message'] = '';
				foreach($flashMessages as $flashMessage) {
					$GLOBALS['Message'] .= MessageBox($flashMessage['message'], $flashMessage['type']);
				}
			}

			// Show the form to edit a customer
			$customerId = isc_html_escape((int)$_GET['customerId']);

			// Make sure the customer exists
			if (!CustomerExists($customerId)) {
				// The customer doesn't exist
				if ($GLOBALS["ISC_CLASS_ADMIN_AUTH"]->HasPermission(AUTH_Edit_Customers)) {
					$this->ManageCustomers(GetLang('CustomerDoesntExist'), MSG_ERROR);
				} else {
					$GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('Unauthorized'), MSG_ERROR);
				}
				return;
			}

			if (!$GLOBALS["ISC_CLASS_ADMIN_AUTH"]->HasPermission(AUTH_Add_Customer)) {
				$GLOBALS['CustomerAddressAddDisabled'] = 'DISABLED';
			}

			if (!$GLOBALS["ISC_CLASS_ADMIN_AUTH"]->HasPermission(AUTH_Delete_Customers)) {
				$GLOBALS['CustomerAddressDeleteDisabled'] = 'DISABLED';
			}

			if (GetConfig('CurrencyLocation') == 'right') {
				$GLOBALS['CurrencyTokenLeft'] = '';
				$GLOBALS['CurrencyTokenRight'] = GetConfig('CurrencyToken');
			} else {
				$GLOBALS['CurrencyTokenLeft'] = GetConfig('CurrencyToken');
				$GLOBALS['CurrencyTokenRight'] = '';
			}

			if ($PreservePost == true) {
				$customer = $this->_GetCustomerData(0);
			} else {
				$customer = $this->_GetCustomerData($customerId);
			}

			if (isset($_REQUEST['currentTab'])) {
				$GLOBALS['CurrentTab'] = (int)$_REQUEST['currentTab'];
			} else {
				$GLOBALS['CurrentTab'] = 0;
			}

			$query = "SELECT *
						FROM [|PREFIX|]shipping_addresses
						WHERE shipcustomerid='" . $GLOBALS['ISC_CLASS_DB']->Quote((int)$customerId) . "'";

			if ($GLOBALS['ISC_CLASS_DB']->CountResult($GLOBALS['ISC_CLASS_DB']->Query($query))) {
				$GLOBALS['CustomerAddressEmptyShow'] = 'none';
			} else {
				$GLOBALS['CustomerAddressEmptyHide'] = 'none';
			}

			$GLOBALS['FormAction'] = "editCustomer2";
			$GLOBALS['CustomerId'] = $customerId;
			$GLOBALS['Title'] = GetLang('EditCustomerTitle');
			$GLOBALS['Intro'] = GetLang('EditCustomerIntro');
			$GLOBALS['CustomerAddressListWarning'] = GetLang('CustomerAddressNoAddresses');
			$GLOBALS['CustomerFirstName'] = $customer['custconfirstname'];
			$GLOBALS['CustomerLastName'] = $customer['custconlastname'];
			$GLOBALS['CustomerCompany'] = $customer['custconcompany'];
			$GLOBALS['CustomerEmail'] = $customer['custconemail'];
			$GLOBALS['CustomerPhone'] = $customer['custconphone'];
			$GLOBALS['CustomerStoreCredit'] = FormatPrice($customer['custstorecredit'], false, false);
			$GLOBALS['CustomerGroupId'] = $customer['custgroupid'];
			$GLOBALS['CustomerGroupOptions'] = $this->GetCustomerGroupsAsOptions($customer['custgroupid']);
			$GLOBALS['CustomerShippingAddressGrid'] = $this->ManageCustomerAddressGrid();
			$GLOBALS['PasswordRequired'] = '&nbsp;&nbsp;';
			$GLOBALS['PasswordLabel'] = GetLang('CustomerNewPassword');
			$GLOBALS['PasswordHelp'] = GetLang('CustomerNewPasswordHelp');
			$GLOBALS['PasswordConfirmHelp'] = GetLang('CustomerNewPasswordConfirmHelp');
			$GLOBALS['PasswordConfirmError'] = GetLang('CustomerNewPasswordConfirmError');
			$GLOBALS['PasswordConfirmRequired'] = '&nbsp;&nbsp;';
			$GLOBALS['CustomFieldsAccountFormId'] = FORMFIELDS_FORM_ACCOUNT;
			$GLOBALS['CustomFields'] = '';

//.........这里部分代码省略.........
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:class.customers.php

示例5: Admin_Action_Edit

 /**
  * Admin_Action_Edit
  * This will display the edition/creation page for dynamic content tag
  *
  */
 public function Admin_Action_Edit()
 {
     $ssf = new SendStudio_Functions();
     $id = $this->_getGETRequest('id', 0);
     $userAPI = GetUser();
     $userLists = $userAPI->GetLists();
     $userListsId = array_keys($userLists);
     if (sizeof($userListsId) < 1) {
         $GLOBALS['Intro_Help'] = GetLang('Addon_dynamiccontenttags_Form_Intro');
         $GLOBALS['Intro'] = GetLang('Addon_dynamiccontenttags_Form_CreateHeading');
         $GLOBALS['Lists_AddButton'] = '';
         if ($userAPI->CanCreateList() === true) {
             FlashMessage(sprintf(GetLang('Addon_dynamiccontenttags_Tags_NoLists'), GetLang('Addon_dynamiccontenttags_ListCreate')), SS_FLASH_MSG_SUCCESS);
             $GLOBALS['Message'] = GetFlashMessages();
             $GLOBALS['Lists_AddButton'] = $this->template_system->ParseTemplate('Dynamiccontenttags_List_Create_Button', true);
         } else {
             FlashMessage(sprintf(GetLang('Addon_dynamiccontenttags_Tags_NoLists'), GetLang('Addon_dynamiccontenttags_ListAssign')), SS_FLASH_MSG_SUCCESS);
             $GLOBALS['Message'] = GetFlashMessages();
         }
         $this->template_system->ParseTemplate('Dynamiccontenttags_Subscribers_No_Lists');
         return;
     }
     $listIDs = array();
     $this->template_system->Assign('DynamicContentTagId', intval($id));
     if ($id === 0) {
         $this->template_system->Assign('FormType', 'create');
     } else {
         $this->template_system->Assign('FormType', 'edit');
         // Load the existing Tags.
         $tag = new DynamicContentTag_Api_Tag($id);
         if (!$tag->getTagId()) {
             FlashMessage(GetLang('NoAccess'), SS_FLASH_MSG_ERROR, $this->admin_url);
             return false;
         }
         $tag->loadLists();
         $tag->loadBlocks();
         $listIDs = $tag->getLists();
         $blocks = $tag->getBlocks();
         $blocksString = '';
         foreach ($blocks as $blockEntry) {
             $rule = $blockEntry->getRules();
             $rule = str_replace(array('\\"', "'"), array('\\\\"', '&#39;'), $rule);
             $blocksString .= " BlockInterface.Add(" . intval($blockEntry->getBlockId()) . ", '" . $blockEntry->getName() . "', " . intval($blockEntry->isActivated()) . ", " . intval($blockEntry->getSortOrder()) . ", '" . $rule . "'); ";
         }
         $this->template_system->Assign('dynamiccontenttags_name', $tag->getName());
         $this->template_system->Assign('dynamiccontenttags_blocks', $blocksString);
     }
     $tempList = $userAPI->GetLists();
     $tempSelectList = '';
     foreach ($tempList as $tempEach) {
         $tempSubscriberCount = intval($tempEach['subscribecount']);
         $GLOBALS['ListID'] = intval($tempEach['listid']);
         $GLOBALS['ListName'] = htmlspecialchars($tempEach['name'], ENT_QUOTES, SENDSTUDIO_CHARSET);
         $GLOBALS['OtherProperties'] = in_array($GLOBALS['ListID'], $listIDs) ? ' selected="selected"' : '';
         if ($tempSubscriberCount == 1) {
             $GLOBALS['ListSubscriberCount'] = GetLang('Addon_dynamiccontenttags_Subscriber_Count_One');
         } else {
             $GLOBALS['ListSubscriberCount'] = sprintf(GetLang('Addon_dynamiccontenttags_Subscriber_Count_Many'), $ssf->FormatNumber($tempSubscriberCount));
         }
         $tempSelectList .= $this->template_system->ParseTemplate('DynamicContentTags_Form_ListRow', true);
         unset($GLOBALS['OtherProperties']);
         unset($GLOBALS['ListSubscriberCount']);
         unset($GLOBALS['ListName']);
         unset($GLOBALS['ListID']);
     }
     // If list is less than 10, use the following formula: list size * 25px for the height
     $tempCount = count($tempList);
     if ($tempCount <= 10) {
         if ($tempCount < 3) {
             $tempCount = 3;
         }
         $selectListStyle = 'height: ' . $tempCount * 25 . 'px;';
         $this->template_system->Assign('SelectListStyle', $selectListStyle);
     }
     $flash_messages = GetFlashMessages();
     $this->template_system->Assign('FlashMessages', $flash_messages, false);
     $this->template_system->Assign('AdminUrl', $this->admin_url, false);
     $this->template_system->Assign('SelectListHTML', $tempSelectList);
     $this->template_system->ParseTemplate('dynamiccontenttags_form');
 }
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:85,代码来源:dynamiccontenttags.php

示例6: Show_Send_Step_10

 /**
  * Show_Send_Step_10
  * This is the page that gets shown when a user clicks "pause" in the split test send popup window.
  *
  * It marks the job as "paused" in the database
  * then shows an appropriate message.
  *
  * @uses GetApi
  * @uses Splittest_Send_API::PauseJob
  */
 public function Show_Send_Step_10()
 {
     $send_details = IEM::sessionGet('SplitTestSendDetails');
     if (!$send_details || !isset($send_details['splitid']) || (int) $send_details['splitid'] <= 0) {
         FlashMessage(GetLang('Addon_splittest_Send_InvalidSplitTest'), SS_FLASH_MSG_ERROR, $this->admin_url);
         return;
     }
     $job = (int) $send_details['Job'];
     /**
      * Pause it in the split test.
      * This makes it easier to work out a send's "state" (paused, in progress etc).
      */
     $send_api = $this->GetApi('Splittest_Send');
     $paused = $send_api->PauseJob($job, $send_details['splitid']);
     if ($paused) {
         FlashMessage(GetLang('Addon_splittest_Send_Paused_Success'), SS_FLASH_MSG_SUCCESS);
     } else {
         FlashMessage(GetLang('Addon_splittest_Send_Paused_Failure'), SS_FLASH_MSG_ERROR);
     }
     $flash_messages = GetFlashMessages();
     $this->template_system->Assign('FlashMessages', $flash_messages, false);
     $this->template_system->Assign('AdminUrl', $this->admin_url);
     $this->template_system->ParseTemplate('send_paused');
 }
开发者ID:solsticehc,项目名称:solsticehc,代码行数:34,代码来源:splittest_send.php

示例7: ManageOrders


//.........这里部分代码省略.........
         $args = 'disabled="1"';
     } else {
         $args = 'value="delete"';
     }
     $GLOBALS['OrderActionOptions'] .= '<option ' . $args . '>' . GetLang('DeleteSelected') . '</option>';
     if ($numOrders > 0) {
         if ($MsgDesc == "" && (isset($_REQUEST['searchQuery']) || isset($_GET['searchId']) || count($_GET) > 1)) {
             if ($numOrders == 1) {
                 $MsgDesc = GetLang('OrderSearchResultsBelow1');
             } else {
                 $MsgDesc = sprintf(GetLang('OrderSearchResultsBelowX'), $numOrders);
             }
             $MsgStatus = MSG_SUCCESS;
         }
         $args1 = 'value="printInvoice"';
         $args2 = 'value="printSlip"';
     } else {
         $args1 = 'disabled="1"';
         $args2 = 'disabled="1"';
     }
     $GLOBALS['OrderActionOptions'] .= '<option ' . $args1 . '>' . GetLang('PrintInvoicesSelected') . '</option>';
     $GLOBALS['OrderActionOptions'] .= '<option ' . $args2 . '>' . GetLang('PrintPackingSlipsSelected') . '</option>';
     if (!gzte11(ISC_MEDIUMPRINT)) {
         $GLOBALS[base64_decode('SGlkZUV4cG9ydA==')] = "none";
     } else {
         // Do we need to disable the export button?
         if (!$GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Export_Orders) || $numOrders == 0) {
             $args = 'disabled="1"';
         } else {
             $args = 'value="export"';
         }
         $GLOBALS['OrderActionOptions'] .= '<option ' . $args . '>' . GetLang('ExportOrders') . '</option>';
         //$GLOBALS['OrderActionOptions'] .= '<option ' . $args . '>' . 'Send Review Request' . '</option>';
     }
     //zfang
     //$GLOBALS['OrderActionOptions'] .= '<option ' . $args . '>' . 'Send Review Request' . '</option>';
     $GLOBALS['OrderActionOptions'] .= '<option value="sendOrdReviewReq">' . GetLang('SendReviewRequest') . '</option>';
     $GLOBALS['OrderActionOptions'] .= '<option disabled="1"></option><optgroup label="' . GetLang('BulkOrderStatus') . '">';
     $result = $GLOBALS['ISC_CLASS_DB']->Query("SELECT * FROM [|PREFIX|]order_status where statusid!=0 ORDER BY statusorder ASC");
     while ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {
         $GLOBALS['OrderActionOptions'] .= '<option value="updateStatus' . $row['statusid'] . '">' . $row['statusdesc'] . '</option>';
     }
     $GLOBALS['OrderActionOptions'] .= '</optgroup>';
     if (!isset($_REQUEST['searchId'])) {
         $_REQUEST['searchId'] = 0;
     }
     // Get the custom search as option fields
     $GLOBALS['CustomSearchOptions'] = $GLOBALS['ISC_CLASS_ADMIN_CUSTOMSEARCH']->GetSearchesAsOptions($_REQUEST['searchId'], $num_custom_searches, "AllOrders", "viewOrders", "customOrderSearch");
     if (!isset($_REQUEST['searchId'])) {
         $GLOBALS['HideDeleteCustomSearch'] = "none";
     } else {
         $GLOBALS['CustomSearchId'] = (int) $_REQUEST['searchId'];
     }
     $GLOBALS['OrderIntro'] = GetLang('ManageOrdersIntro');
     $GLOBALS['Message'] = '';
     // No orders
     if ($numOrders == 0) {
         $GLOBALS['DisplayGrid'] = "none";
         // Performing a search of some kind
         if (count($_GET) > 1) {
             if ($MsgDesc == "") {
                 $GLOBALS['Message'] = MessageBox(GetLang('NoOrderResults'), MSG_ERROR);
             }
         } else {
             $GLOBALS['Message'] = MessageBox(GetLang('NoOrders'), MSG_SUCCESS);
             $GLOBALS['DisplaySearch'] = "none";
         }
     }
     if ($MsgDesc != "") {
         $GLOBALS['Message'] = MessageBox($MsgDesc, $MsgStatus);
     }
     $flashMessages = GetFlashMessages();
     if (is_array($flashMessages)) {
         foreach ($flashMessages as $flashMessage) {
             $GLOBALS['Message'] .= MessageBox($flashMessage['message'], $flashMessage['type']);
         }
     }
     $GLOBALS['ExportAction'] = "index.php?ToDo=startExport&t=orders";
     if (isset($GLOBALS['CustomSearchId']) && $GLOBALS['CustomSearchId'] != '0') {
         $GLOBALS['ExportAction'] .= "&searchId=" . $GLOBALS['CustomSearchId'];
     } else {
         $query_params = explode('&', $_SERVER['QUERY_STRING']);
         $params = array();
         $ignore = array("ToDo");
         foreach ($query_params as $param) {
             $arr = explode("=", $param);
             if (!in_arrayi($arr[0], $ignore)) {
                 $params[$arr[0]] = $arr[1];
             }
         }
         if (count($params)) {
             $GLOBALS['ExportAction'] .= "&" . http_build_query($params);
         }
     }
     // Used for iPhone interface
     $GLOBALS['OrderStatusOptions'] = $this->GetOrderStatusOptions();
     $GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate("orders.manage");
     $GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();
     echo $GLOBALS['ISC_CLASS_DB']->GetErrorMsg();
 }
开发者ID:nirvana-info,项目名称:old_bak,代码行数:101,代码来源:class.orders.php

示例8: del_user_dir

function del_user_dir($edogyt44 = 0)
{
	$vomawoh8 = (create_user_dir(0, 2) === true);
	if (!$vomawoh8) {
		GetFlashMessages();
	}
	if (!is_array($edogyt44) && $edogyt44 > 0) {
		remove_directory(TEMP_DIRECTORY . "/user/" . $edogyt44);
	}
	return true;
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:11,代码来源:process.php

示例9: ManageLayouts

 public function ManageLayouts($MsgDesc = "", $MsgStatus = "", $template = "")
 {
     $output = '';
     if (isset($_REQUEST['ForceTab'])) {
         $GLOBALS['ForceTab'] = (int) $_REQUEST['ForceTab'];
     }
     if (isset($_REQUEST['forceTab'])) {
         $GLOBALS['ForceTab'] = (int) $_REQUEST['forceTab'];
     }
     $opener = new connect_remote();
     if ($opener->CanOpen()) {
         $GLOBALS['FopenSupport'] = true;
     } else {
         $GLOBALS['FopenSupport'] = false;
     }
     $GLOBALS['CurrentTemplateName'] = GetConfig('template');
     $GLOBALS['CurrentTemplateNameProper'] = ucfirst(GetConfig('template'));
     $GLOBALS['CurrentTemplateColor'] = GetConfig('SiteColor');
     $GLOBALS['StoreLogo'] = GetConfig('StoreLogo');
     $GLOBALS['siteName'] = GetConfig('StoreName');
     $this->LoadChooseTemplateTab();
     $this->LoadDownloadTemplates();
     $this->LoadLogoTab();
     if (file_exists(ISC_BASE_PATH . '/templates/' . GetConfig('template') . '/config.php')) {
         include ISC_BASE_PATH . '/templates/' . GetConfig('template') . '/config.php';
         if (isset($GLOBALS['TPL_CFG']['GenerateLogo']) && $GLOBALS['TPL_CFG']['GenerateLogo'] === true) {
             $GLOBALS['CurrentTemplateHasLogoOption'] = 'true';
         } else {
             $GLOBALS['CurrentTemplateHasLogoOption'] = 'false';
         }
     }
     if (GetConfig('DisableTemplateDownloading')) {
         $GLOBALS['HideDownloadTab'] = 'none';
     }
     $GLOBALS['TemplateVersion'] = '1.0';
     if (isset($GLOBALS['TPL_CFG']['Version'])) {
         $GLOBALS['TemplateVersion'] = $GLOBALS['TPL_CFG']['Version'];
     }
     $GLOBALS['LayoutIntro'] = GetLang('TemplateIntro');
     if (GetConfig('TemplatesOrderCustomURL') == '') {
         $GLOBALS['HideOrderCustomTemplate'] = "none";
     }
     if (GetConfig('DesignMode')) {
         $GLOBALS['DesignModeChecked'] = "checked";
     }
     if ($MsgDesc != "") {
         $GLOBALS['Message'] = MessageBox($MsgDesc, $MsgStatus);
     }
     $flashMessages = GetFlashMessages();
     if (is_array($flashMessages)) {
         $GLOBALS['Message'] = '';
         foreach ($flashMessages as $flashMessage) {
             $GLOBALS['Message'] .= MessageBox($flashMessage['message'], $flashMessage['type']);
         }
     }
     if (!function_exists("gzdeflate")) {
         // No zlib - they can't download templates automatically
         $GLOBALS['HideDownloadMessage'] = "none";
         $GLOBALS['NoZLibMessage'] = MessageBox(GetLang('NoZLibInstalled'), MSG_ERROR);
     } else {
         // They have zlib - hide the zlib error message
         $GLOBALS['HideNoZLib'] = "none";
     }
     if (!$this->safeMode) {
         $GLOBALS['HideSafeModeMessage'] = 'display: none';
     }
     // Load the email templates
     $GLOBALS['EmailTemplatesGrid'] = $this->_LoadEmailTemplates();
     $GLOBALS['TemplatesOrderCustomURL'] = GetConfig('TemplatesOrderCustomURL');
     // Load a temporary editor to use for editing email templates
     $wysiwygOptions = array('id' => 'temp_email_editor', 'delayLoad' => true);
     $GLOBALS['TemporaryEditor'] = GetClass('ISC_ADMIN_EDITOR')->GetWysiwygEditor($wysiwygOptions);
     $GLOBALS["ISC_CLASS_TEMPLATE"]->SetTemplate("layout.manage");
     $GLOBALS["ISC_CLASS_TEMPLATE"]->ParseTemplate();
 }
开发者ID:nirvana-info,项目名称:old_bak,代码行数:75,代码来源:class.layout.php

示例10: Process

	/**
	 * Process
	 * This handles working out what stage you are up to and so on with workflow.
	 * @return Void Does not return anything
	 *
	 * @uses GetUser()
	 * @uses User_API::HasAccess()
	 * @uses SendStudio_Functions::PrintHeader()
	 * @uses SendStudio_Functions::DenyAccess()
	 * @uses SendStudio_Functions::PrintFooter()
	 * @uses SendStudio_Functions::_getGETRequest()
	 * @uses TriggerEmails::_ajax()
	 * @uses TriggerEmails::_create()
	 * @uses TriggerEmails::_edit()
	 * @uses TriggerEmails::_copy()
	 * @uses TriggerEmails::_enable()
	 * @uses TriggerEmails::_disable()
	 * @uses TriggerEmails::_save()
	 * @uses TriggerEmails::_delete()
	 * @uses TriggerEmails::_bulkAction()
	 * @uses TriggerEmails::_manage()
	 */
	public function Process()
	{
		// ----- Define and sanitize "common" variables that is used by this function
			$user = GetUser();

			$reqAction		= IEM::requestGetGET('Action', '', 'strtolower');
			$response		= '';
			$parameters 	= array();

			$parameters['message']	= GetFlashMessages();
			$parameters['user']		= GetUser();
			$parameters['action']	= $reqAction;
		// ------


		// ----- Check basic permission
			$access = $user->HasAccess('triggeremails') && check('Triggermails');
			if (!$access) {
				$this->PrintHeader();
				$this->DenyAccess();
				$this->PrintFooter();
				return;
			}
		// ------

		if (!SENDSTUDIO_CRON_ENABLED || SENDSTUDIO_CRON_TRIGGEREMAILS_S <= 0 || SENDSTUDIO_CRON_TRIGGEREMAILS_P <= 0) {
			$parameters['message'] .= $this->PrintWarning('TriggerEmails_Manage_CRON_Alert');
		}

		switch ($reqAction) {
			// AJAX request
			case 'ajax':
				$response = $this->_ajax($parameters);
			break;

			// Show "create" form
			case 'create':
				$response = $this->_create($parameters);
			break;

			// Show "edit" form
			case 'edit':
				$response = $this->_edit($parameters);
			break;

			// Copy trigger record
			case 'copy':
				$response = $this->_copy($parameters);
			break;

			// Enable record
			case 'enable':
				$response = $this->_enable($parameters);
			break;

			// Disable record
			case 'disable':
				$response = $this->_disable($parameters);
			break;

			// Save trigger record (from "create"/"edit" form)
			case 'save':
				$response = $this->_save($parameters);
			break;

			// Delete trigger record
			case 'delete':
				$response = $this->_delete($parameters);
			break;

			// Handle bulk action
			case 'bulkaction':
				$response = $this->_bulkAction($parameters);
			break;

			case 'processpaging':
			default:
				$response = $this->_manage($parameters);
//.........这里部分代码省略.........
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:triggeremails.php

示例11: AddProductStep1

		public function AddProductStep1($MsgDesc = "", $MsgStatus = "", $PreservePost=false)
		{
			if($message = strtokenize($_REQUEST, '#')) {
				$GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoError(GetLang(B('UmVhY2hlZFByb2R1Y3RMaW1pdA==')), $message, MSG_ERROR);
				exit;
			}

			$defaultProduct = array(
				'tax_class_id' => 0,
			);


			if ($MsgDesc != "") {
				$GLOBALS['Message'] = MessageBox($MsgDesc, $MsgStatus);
			} else {
				$flashMessages = GetFlashMessages();
				if(is_array($flashMessages)) {
					$GLOBALS['Message'] = '';
					foreach($flashMessages as $flashMessage) {
						$GLOBALS['Message'] .= MessageBox($flashMessage['message'], $flashMessage['type']);
					}
				}
			}

			// Get the getting started box if we need to
			$GLOBALS['GettingStartedStep'] = '';
			if(empty($GLOBALS['Message']) && (isset($_GET['wizard']) && $_GET['wizard']==1) &&  !in_array('products', GetConfig('GettingStartedCompleted')) && !GetConfig('DisableGettingStarted')) {
				$GLOBALS['GettingStartedTitle'] = GetLang('WizardAddProducts');
				$GLOBALS['GettingStartedContent'] = GetLang('WizardAddProductsDesc');
				$GLOBALS['GettingStartedStep'] = $this->template->render('Snippets/GettingStartedModal.html');
			}

			if (GetConfig('CurrencyLocation') == 'right') {
				$GLOBALS['CurrencyTokenLeft'] = '';
				$GLOBALS['CurrencyTokenRight'] = GetConfig('CurrencyToken');
			} else {
				$GLOBALS['CurrencyTokenLeft'] = GetConfig('CurrencyToken');
				$GLOBALS['CurrencyTokenRight'] = '';
			}

			// delete any uploaded images which are not attached to a product and older than 24 hours
			ISC_PRODUCT_IMAGE::deleteOrphanedProductImages();

			// Delete any temporary combination records older than 24h
			$this->DeleteTemporaryCombinations();

			// Delete any uploaded product downloads which are not attached to a product and older than 24h
			$query = sprintf("select downloadid, downfile from [|PREFIX|]product_downloads where downdateadded<'%d' and productid=0", time()-86400);
			$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
			$dlids = array();
			while($download = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {
				@unlink(APP_ROOT."../".GetConfig('DownloadDirectory')."/".$download['downfile']);
				$dlids[] = $download['downloadid'];
			}
			if(!empty($dlids)) {
				$query = sprintf("delete from [|PREFIX|]product_downloads where downloadid in (%s)", implode(",", $dlids));
				$GLOBALS['ISC_CLASS_DB']->Query($query);
			}

			$GLOBALS['ServerFiles'] = $this->_GetImportFilesOptions();

			$GLOBALS['ISC_CLASS_ADMIN_CATEGORY'] = GetClass('ISC_ADMIN_CATEGORY');

			if($GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId()) {
				$GLOBALS['HideStoreFeatured'] = 'display: none';
			}
			else if(!gzte11(ISC_HUGEPRINT)) {
				$GLOBALS['HideVendorFeatured'] = 'display: none';
			}


			// Set the global variables for the select boxes
			$from_stamp = isc_gmmktime(0, 0, 0, isc_date("m"), isc_date("d"), isc_date("Y"));
			$to_stamp = isc_gmmktime(0, 0, 0, isc_date("m")+1, isc_date("d"), isc_date("Y"));

			$from_day = isc_date("d", $from_stamp);
			$from_month = isc_date("m", $from_stamp);
			$from_year = isc_date("Y", $from_stamp);

			$to_day = isc_date("d", $to_stamp);
			$to_month = isc_date("m", $to_stamp);
			$to_year = isc_date("Y", $to_stamp);

			$GLOBALS['OverviewFromDays'] = $this->_GetDayOptions($from_day);
			$GLOBALS['OverviewFromMonths'] = $this->_GetMonthOptions($from_month);
			$GLOBALS['OverviewFromYears'] = $this->_GetYearOptions($from_year);

			$GLOBALS['OverviewToDays'] = $this->_GetDayOptions($to_day);
			$GLOBALS['OverviewToMonths'] = $this->_GetMonthOptions($to_month);
			$GLOBALS['OverviewToYears'] = $this->_GetYearOptions($to_year);

			$productImages = array();

			if($PreservePost == true) {
				$this->_GetProductData(0, $arrData);
				$this->_GetCustomFieldData(0, $arrCustomFields);
				$this->template->assign('product', $arrData);
				$productImages = $arrData['product_images'];

				$GLOBALS["ProdType_" . $arrData['prodtype']] = 'checked="checked"';
//.........这里部分代码省略.........
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:class.product.php

示例12: Process


//.........这里部分代码省略.........

			case 'hidethis':
				if (isset($_POST['To']) && strtolower($_POST['To']) == 'none') {
					$user->SetSettings('ShowThis', 'none');
					break;
				}
				$user->SetSettings('ShowThis', 'block');
				break;

			case 'getcampaigndropdown':
				$this->PrintCampaignsDropdown();
				break;

			case 'getrecentlists':
				$this->PrintRecentLists();
				break;

			case 'getcampaignchart':
				$statsapi = $this->GetApi('Stats');
				if (isset($_POST['StatId'])) {
					$this->PrintCampaignsChart($_POST['StatId']);
					$user->SetSettings('CampaignChart', $_POST['StatId']);
					break;
				}

				break;
			case 'getcampaignlist':
				if (isset($_POST['To'])) {
					if ($_POST['To'] == 'campaignshowschedule') {
						$this->PrintJobs();
					} else {
						$this->PrintCampaign($_POST['To']);
					}
					break;
				}
				break;

			case 'subscribergraph':
				$this->PrintGraph();
				break;

			case 'cleanupexport':
				$this->CleanupExportFile();
				break;

			case 'getpredefinedlinklist':
				$this->GetPredefinedLinkList();
				break;

			default:
				$db = IEM::getDatabase();
				$GLOBALS['Message'] = GetFlashMessages();

				if ($user->GetSettings('StartLinks') == 'quicklinks') {
					$GLOBALS['HomeGettingStartedDisplay'] = 'display:none;';
					$GLOBALS['StartTitle'] = GetLang('IWouldLikeTo');
					$GLOBALS['SwitchLink'] = GetLang('SwitchtoGettingStartedLinks');
				} else {
					$GLOBALS['HomeQuickLinksDisplay'] = 'display:none;';
					$GLOBALS['StartTitle'] = GetLang('GettingStarted_Header');
					$GLOBALS['SwitchLink'] = GetLang('SwitchtoQuickLinks');
				}

				$GLOBALS['HideThisDisplay'] = 'display:block;';
				$GLOBALS['HideThisText'] = GetLang('GettingStarted_HideThis');
				if ($user->GetSettings('ShowThis') == 'none') {
					$GLOBALS['HideThisDisplay'] = 'display:none;';
					$GLOBALS['HideThisText'] = GetLang('GettingStarted_ShowMore');
				}

				$GLOBALS['CampaignSelectedLink'] = $user->GetSettings('CampaignLinks');
				if (!$GLOBALS['CampaignSelectedLink']) {
					$GLOBALS['CampaignSelectedLink'] = 'campaignshowall';
				}

				$GLOBALS['CampaignSelectedChart'] = $user->GetSettings('CampaignChart');
				if (!$GLOBALS['CampaignSelectedChart']) {
					$GLOBALS['CampaignSelectedChart'] = 0;
				}

				$GLOBALS['VersionCheckInfo'] = $this->_CheckVersion();

				$GLOBALS['DisplayBox'] = GetDisplayInfo($this, false, null);

				$this->PrintSystemMessage();

				$GLOBALS['DisplayListButton'] = 'none';
				if ($this->PrintRecentLists(true)) {
					$GLOBALS['DisplayListButton'] = 'block';
				}

				$tpl = GetTemplateSystem();
				$tpl->Assign('showintrovideo', !!constant('SHOW_INTRO_VIDEO'));
				$tpl->ParseTemplate('index');
		}

		if ($print_header) {
			$this->PrintFooter();
		}
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:index.php

示例13: EditAddonProductStep1

 /**
  * Edit page
  *
  * Method will construct the edit page
  *
  * @access public
  * @param string $MsgDesc The optional message to display
  * @param string $MsgStatus The optional status of the message
  * @param bool $PreservePost TRUE to use the REQUEST variable, FALSE to read from the database. Default is FALSE
  * @return Void
  */
 public function EditAddonProductStep1($MsgDesc = "", $MsgStatus = "", $PreservePost = false)
 {
     if ($MsgDesc != "") {
         $GLOBALS['Message'] = MessageBox($MsgDesc, $MsgStatus);
     }
     $flashMessages = GetFlashMessages();
     if (is_array($flashMessages) && !empty($flashMessages)) {
         $GLOBALS['Message'] = '';
         foreach ($flashMessages as $flashMessage) {
             $GLOBALS['Message'] .= MessageBox($flashMessage['message'], $flashMessage['type']);
         }
     }
     // Show the form to edit
     $addonProductId = (int) $_GET['addonProductId'];
     // Make sure it exists
     if (!AddonProductExists($addonProductId)) {
         // doesn't exist
         if ($GLOBALS["ISC_CLASS_ADMIN_AUTH"]->HasPermission(AUTH_Manage_Addon_Products)) {
             $this->ManageAddonProducts(GetLang('AddonProductDoesntExist'), MSG_ERROR);
         } else {
             $GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('Unauthorized'), MSG_ERROR);
         }
         return;
     }
     if (GetConfig('CurrencyLocation') == 'right') {
         $GLOBALS['CurrencyTokenLeft'] = '';
         $GLOBALS['CurrencyTokenRight'] = GetConfig('CurrencyToken');
     } else {
         $GLOBALS['CurrencyTokenLeft'] = GetConfig('CurrencyToken');
         $GLOBALS['CurrencyTokenRight'] = '';
     }
     if ($PreservePost == true) {
         $addonProduct = $this->_GetAddonProductData(0);
     } else {
         $addonProduct = $this->_GetAddonProductData($addonProductId);
     }
     if (isset($_REQUEST['currentTab'])) {
         $GLOBALS['CurrentTab'] = (int) $_REQUEST['currentTab'];
     } else {
         $GLOBALS['CurrentTab'] = 0;
     }
     $GLOBALS['FormAction'] = "editaddonproduct2";
     $GLOBALS['AddonProductId'] = $addonProductId;
     $GLOBALS['Title'] = GetLang('EditAddonProduct');
     $GLOBALS['Intro'] = GetLang('EditAddonProductsIntro');
     $GLOBALS['AddonProductProductId'] = $addonProduct['productid'];
     $GLOBALS['AddonProductProductName'] = $addonProduct['productname'];
     $GLOBALS['AddonProductPrice'] = FormatPrice($addonProduct['price'], false, false);
     $GLOBALS['AddonProductDescription'] = $addonProduct['description'];
     $addonProduct['status'] == 0 ? $GLOBALS['AddonProductStatusDisabled'] = 'selected="selected"' : ($GLOBALS['AddonProductStatusEnabled'] = 'selected="selected"');
     $GLOBALS['SaveAndAddAnother'] = GetLang('SaveAndContinueEditing');
     $GLOBALS['CancelMessage'] = GetLang('ConfirmCancelAddonProduct');
     $GLOBALS["ISC_CLASS_TEMPLATE"]->SetTemplate("addonproduct.form");
     $GLOBALS["ISC_CLASS_TEMPLATE"]->ParseTemplate();
 }
开发者ID:nirvana-info,项目名称:old_bak,代码行数:66,代码来源:class.addonproduct.php

示例14: TriggerEmailsStats_View

		/**
		 * TriggerEmailsStats_View
		 * Handle listing of the trigger emails statistics
		 *
		 * @return Void Prints output directly to stdout without returning anything.
		 *
		 * @uses Stats_API::GetTriggerEmailsStats()
		 */
		function TriggerEmailsStats_View()
		{
			// ----- Sanitize and declare variables that is going to be used in this function
				$user = IEM::userGetCurrent();

				$id					= intval($this->_getGETRequest('id', ''));

				$record				= array();
				$triggerrecord		= array();

				$api				= $this->GetApi();
				$triggerapi			= $this->GetApi('TriggerEmails');

				$page = array(
					'messages'		=> GetFlashMessages(),
					'whichtab'		=> intval($this->_getGETRequest('tab', 1)),
					'unique_open'	=> ($this->_getGETRequest('Unique', false) ? true : false),
					'session_token'	=> md5(uniqid(rand()))
				);

				$tabs				= array(
					'snapshot'		=> array(),
					'open'			=> array(),
					'links'			=> array(),
					'bounces'		=> array(),
					'unsubscribe'	=> array(),
					'forward'		=> array(),
					'recipients'	=> array()
				);

			// ----

			if ($id == 0) {
				return $this->TriggerEmailsStats_List();
			}

			// Make sure that user can access this particular trigger email statistics
			if (!$this->_TriggerEmailsStats_Access($id)) {
				return $this->TriggerEmailsStats_List();
			}

			// ----- Load trigger emails statistics record
				$record = $api->GetTriggerEmailsStatsRecord($id);
				$triggerrecord = $triggerapi->GetRecordByID($id, true, true);

				if (!isset($triggerrecord['triggeractions']) || !is_array($triggerrecord['triggeractions'])) {
					$triggerrecord['triggeractions'] = array();
				}

				if (!isset($triggerrecord['triggeractions']['send']) || !is_array($triggerrecord['triggeractions']['send'])) {
					$triggerrecord['triggeractions']['send'] = array();
				}

				$temp = array('trackopens', 'tracklinks');
				foreach ($temp as $each) {
					if (!isset($triggerrecord['triggeractions']['send'][$each])) {
						$triggerrecord['triggeractions']['send'][$each] = 0;
					}
				}

				if (empty($record)) {
					return $this->TriggerEmailsStats_List();
				}
			// -----


			// Log this to "User Activity Log"
			IEM::logUserActivity($_SERVER['REQUEST_URI'], 'images/chart_bar.gif', $record['triggeremailsname']);

			// ----- Calculate some common variables for the record
				$record['processed_totalsent'] = intval($record['htmlrecipients']) + intval($record['textrecipients']) + intval($record['multipartrecipients']);
				$record['processed_unopened'] = abs($record['processed_totalsent'] - $record['emailopens_unique']);
				$record['processed_totalbounced'] = intval($record['bouncecount_soft']) + intval($record['bouncecount_hard']) + intval($record['bouncecount_unknown']);

				if ($record['processed_totalsent'] != 0) {
					if ($triggerrecord['triggeractions']['send']['trackopens'] != 0) {
						$record['processed_timeframe_emailopens_total'] = intval($api->GetOpens($record['statid'], 1, 'all', $page['unique_open'], $this->CalendarRestrictions['opens'], true));
						$record['processed_timeframe_emailopens_unique'] = intval($api->GetOpens($record['statid'], 1, 'all', $page['unique_open'], $this->CalendarRestrictions['opens'], true));
					}

					if ($triggerrecord['triggeractions']['send']['tracklinks'] != 0) {
						$record['processed_timeframe_linkclicks_total'] = intval($api->GetClicks($record['statid'], 1, 'all', 'a', $this->CalendarRestrictions['clicks'], true));
						$record['processed_timeframe_linkclicks_unique'] = intval($api->GetUniqueClicks($record['statid'], 'a', $this->CalendarRestrictions['clicks']));
						$record['processed_timeframe_linkclicks_individuals'] = intval($api->GetUniqueClickRecipients($record['statid'], $this->CalendarRestrictions['clicks'], 'a'));
					}

					$record['processed_timeframe_bounces'] = intval($api->GetBounces($record['statid'], 1, 'all', 'any', $this->CalendarRestrictions['bounces'], true));

					$record['processed_timeframe_unsubscribes'] = intval($api->GetUnsubscribes($record['statid'], 1, 'all', $this->CalendarRestrictions['unsubscribes'], true));

					if (array_key_exists('forwards', $this->CalendarRestrictions) && !empty($this->CalendarRestrictions['forwards'])) {
						$record['processed_timeframe_forwards'] = intval($api->GetForwards($record['statid'], 1, 'all', $this->CalendarRestrictions['forwards'], true));
//.........这里部分代码省略.........
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:stats.php

示例15: GetOrderQuickView


//.........这里部分代码省略.........
			$query = "
				SELECT *
				FROM [|PREFIX|]order_shipping
				WHERE order_id='".$order['orderid']."'
			";
			$result = $this->db->query($query);
			while($shipping = $this->db->fetch($result)) {
				$shipping['cost'] = $shipping[$shippingCostColumn];
				$orderAddresses[$shipping['order_address_id']]['shipping'] = $shipping;
			}

			// Get the products in the order
			$prodFieldsArray = getClass('ISC_ADMIN_ORDERS')->getOrderProductFieldsData($orderId);

			// Get the products in the order
			$products = array();
			$query = "
				SELECT o.*, p.productid, p.prodname, p.prodpreorder, p.prodreleasedate, p.prodpreordermessage
				FROM [|PREFIX|]order_products o
				LEFT JOIN [|PREFIX|]products p ON (p.productid=o.ordprodid)
				WHERE orderorderid='" . $orderId . "'
				ORDER BY ordprodname";
			$result = $GLOBALS['ISC_CLASS_DB']->Query($query);
			while($product = $this->db->fetch($result)) {
				if($product['ordprodoptions'] != '') {
					$product['options'] = unserialize($product['ordprodoptions']);
				}

				if(isset($prodFieldsArray[$product['orderprodid']])) {
					$product['configurable_fields'] = $prodFieldsArray[$product['orderprodid']];
				}

				if($product['prodname']) {
					$product['prodlink'] = prodLink($product['prodname']);
				}

				if($product['productid'] && $product['prodpreorder']) {
					$message = getLang('Thisisapreordereditem');
					if($product['prodreleasedate']) {
						$message = $product['prodpreordermessage'];
						if(!$message) {
							$message = getConfig('DefaultPreOrderMessage');
						}
						$message = str_replace('%%DATE%%', isc_date(getConfig('DisplayDateFormat'), $product['prodreleasedate']), $message);
					}
					$product['preorder_message'] = $message;
				}

				if($product['ordprodeventdate']) {
					$product['ordprodeventdate'] = isc_date('jS M Y', $product['ordprodeventdate']);
				}

				$product['total'] = $product[$itemTotalColumn];

				$productAddressId = $product['order_address_id'];
				if(!isset($orderAddresses[$productAddressId])) {
					$orderAddresses[$productAddressId] = array(
						'products' => array()
					);
				}
				$orderAddresses[$productAddressId]['products'][] = $product;
			}
			$this->template->assign('orderAddresses', $orderAddresses);

			$this->template->assign('totalRows', getOrderTotalRows($order));

			if (gzte11(ISC_MEDIUMPRINT) && isId($order['ordformsessionid'])) {
				$billingFields = $GLOBALS['ISC_CLASS_FORM']->getSavedSessionData(
					$order['ordformsessionid'],
					array(),
					FORMFIELDS_FORM_BILLING,
					true
				);
				$this->template->assign('billingCustomFields', $billingFields);

				$shippingFields = $GLOBALS['ISC_CLASS_FORM']->getSavedSessionData(
					$order['ordformsessionid'],
					array(),
					FORMFIELDS_FORM_SHIPPING,
					true
				);
				$this->template->assign('shippingCustomFields', $shippingFields);
			}

			$this->template->assign('order', $order);
			$this->template->assign('orderStatusOptions',
				getClass('ISC_ADMIN_ORDERS')->getOrderStatusOptions($order['ordstatus'])
			);

			$message = '';
			$flashMessages = GetFlashMessages();
			if(is_array($flashMessages)) {
				foreach($flashMessages as $flashMessage) {
					$message .= MessageBox($flashMessage['message'], $flashMessage['type']);
				}
			}
			$this->template->assign('message', $message);

			$this->template->display('order.quickview.tpl');
		}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:class.remote.php


注:本文中的GetFlashMessages函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。