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


PHP IEM::requestGetGET方法代码示例

本文整理汇总了PHP中IEM::requestGetGET方法的典型用法代码示例。如果您正苦于以下问题:PHP IEM::requestGetGET方法的具体用法?PHP IEM::requestGetGET怎么用?PHP IEM::requestGetGET使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IEM的用法示例。


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

示例1: Process

	/**
	* Process
	* Takes the appropriate action based on the action and user permissions
	*
	* @see GetUser
	* @see User_API::HasAccess
	* @see PrintHeader
	* @see PrintFooter
	*
	* @return Void Doesn't return anything. Takes the appropriate action.
	*/
	function Process()
	{
		$GLOBALS['Message'] = '';

		$action = (isset($_GET['Action'])) ? strtolower($_GET['Action']) : null;
		$user = GetUser();

		$secondary_actions = array('step2', 'sendpreview', 'view', 'processpaging', 'activate', 'deactivate', 'pause', 'resume', 'change', 'checkspam', 'viewcompatibility');
		if (in_array($action, $secondary_actions)) {
			$access = $user->HasAccess('Autoresponders');
		} else {
			$access = $user->HasAccess('Autoresponders', $action);
		}

		$popup = (in_array($action, $this->PopupWindows)) ? true : false;
		if (!in_array($action, $this->SuppressHeaderFooter)) {
			$this->PrintHeader($popup);
		}

		if (!$access) {
			if (!$popup) {
				$this->DenyAccess();
				return;
			}
		}

		/**
		 * Check user permission to see whether or not they have access to the autoresponder
		 */
			$tempAPI = null;
			$tempCheckActions = array('activate', 'deactivate', 'copy', 'change', 'pause', 'resume', 'delete', 'step2', 'sendpreview', 'view', 'edit');
			$tempID = null;

			if (isset($_GET['id'])) {
				$tempID = $_GET['id'];
			} elseif(isset($_POST['autoresponders'])) {
				$tempID = $_POST['autoresponders'];
			}

			if (!is_null($tempID)) {
				$_GET['id'] = $tempID;
				$_POST['autoresponders'] = $tempID;

				if (!$user->Admin() && in_array($action, $tempCheckActions)) {
					if (!is_array($tempID)) {
						$tempID = array($tempID);
					}

					$tempAPI = $this->GetApi();

					foreach ($tempID as $tempEachID) {
						$tempEachID = intval($tempEachID);
						if ($tempEachID == 0) {
							continue;
						}

						if (!$tempAPI->Load($tempEachID)) {
							continue;
						}

						if ($tempAPI->ownerid != $user->userid) {
							$this->DenyAccess();
							return;
						}
					}
				}
			}

			unset($tempID);
			unset($tempCheckActions);
			unset($tempAPI);
		/**
		 * -----
		 */

		if ($action == 'processpaging') {
			$this->SetPerPage($_GET['PerPageDisplay']);
			$action = 'step2';
		}


		switch ($action) {
			case 'pause':
			case 'resume': 
				$autoresponderAPI = $this->GetApi();
				$autoresponderID = IEM::requestGetGET('id', 0, 'intval');
				$listID = IEM::requestGetGET('list', 0, 'intval');

				if ($action == 'pause') {
//.........这里部分代码省略.........
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:101,代码来源:autoresponders.php

示例2: Admin_Action_Edit

 public function Admin_Action_Edit()
 {
     $this->Admin_Action_PreConfig();
     $me = self::LoadSelf();
     $formId = (int) IEM::requestGetGET('formId');
     // if a form id was given, load the corresponding form
     $surveysApi = $this->getApi();
     $this->_checkSurveyAccess($formId);
     $formId = $surveysApi->getId();
     if (!empty($formId)) {
         $widgetTemplates = array();
         $widgetapi = $this->getSpecificApi('widgets');
         $surveys_widgets = $surveysApi->getWidgets($formId);
         foreach ($surveys_widgets as $widget) {
             $widgetapi->SetId($widget['id']);
             $me->template_system->Assign('randomId', 'widget_' . md5(microtime()));
             $me->template_system->Assign('widget', $widget);
             $me->template_system->Assign('widgetFields', $widgetapi->getFields());
             $me->template_system->Assign('widgetFieldOther', $widgetapi->getOtherField());
             $widgetTemplates[] = $me->template_system->ParseTemplate('widget.' . $widget['type'], true);
         }
         $me->template_system->Assign('widgetTemplates', $widgetTemplates);
     } else {
         // now die here..
         FlashMessage(GetLang('Addon_Surveys_InvalidSurveyID'), SS_FLASH_MSG_ERROR);
         // default checkbox state
         $surveysApi->email_feedback = 1;
         // default action after submitting a form
         $surveysApi->after_submit = 'show_message';
         // the default message to be shown
         $surveysApi->show_message = GetLang('Addon_surveys_Settings_ShowMessage');
         // the default uri to be shown
         $surveysApi->show_uri = GetLang('Addon_surveys_Settings_ShowUri');
         // the default error message to be shown
         $surveysApi->error_message = GetLang('Addon_surveys_Settings_ErrorMessage');
         // the default error message to be shown
         $surveysApi->submit_button_text = GetLang('Addon_surveys_Settings_Submit');
     }
     // assign default form email
     if (!$surveysApi->Get('email')) {
         $surveysApi->email = $survey->emailaddress;
     }
     // assign survey and widget data
     $form_data = $surveysApi->GetData();
     foreach ($form_data as &$form_val) {
         $form_val = htmlspecialchars($form_val);
     }
     $me->template_system->Assign('Heading', GetLang('Addon_surveys_Heading_Edit'));
     $me->template_system->Assign('Intro', GetLang('Addon_surveys_Edit_Intro'));
     $me->template_system->Assign('FlashMessages', GetFlashMessages(), false);
     $me->template_system->Assign('form', $form_data);
     $me->template_system->ParseTemplate('survey_form');
 }
开发者ID:solsticehc,项目名称:solsticehc,代码行数:53,代码来源:surveys.php

示例3: PrintManageUsers

	/**
	* PrintManageUsers
	* Prints a list of users to manage. If you are only allowed to manage your own account, only shows your account in the list. This allows you to edit, delete and so on.
	*
	* @see GetApi
	* @see GetPerPage
	* @see GetSortDetails
	* @see User_API::Admin
	* @see GetUsers
	* @see SetupPaging
	*
	* @return Void Prints out the list, doesn't return anything.
	*/
	function PrintManageUsers()
	{
		// ----- Sanitize and declare variables that is going to be used in this function
			$pageRecordPP		= 0;
			$pageCurrentIndex	= $this->GetCurrentPage();
			$pageSortInfo		= $this->GetSortDetails();

			$requestPreserveQuickSearch	= IEM::requestGetGET('PreserveQuickSearch', 0, 'intval');
			$requestSearch				= IEM::requestGetPOST('QuickSearchString', false);
			$requestGroupID				= IEM::requestGetGET('GroupID', 0, 'intval');

			$records			= array();
			$recordTotal		= 0;

			$api				= $this->GetApi('User');

			$currentUser		= IEM::getCurrentUser();

			$page = array(
				'messages'		=> GetFlashMessages(),
				'userreport'	=> '',
				'currentuserid'	=> $currentUser->userid
			);

			$permissions = array(
				'admin'				=> $currentUser->UserAdmin()
			);

			$groupInformation = array();
		// -----

		// Only admin/user admin able to view these pages
		if (!$currentUser->isAdmin()) {
			$this->DenyAccess();
		}

		$temp = ssk23twgezm2();
		if (is_array($temp) && isset($temp['message'])) {
			$page['userreport'] = $temp['message'];
		}

		if ($requestSearch === false && $requestPreserveQuickSearch) {
			$requestSearch = IEM::sessionGet('Users_Manage_QuickSearchString', '');
		} else {
			$requestSearch = trim($requestSearch);
			IEM::sessionSet('Users_Manage_QuickSearchString', $requestSearch);
		}

		// ----- Get "Record Per Page"
			if ($pageRecordPP == 0) {
				$pageRecordPP = $this->GetPerPage();
			}
		// -----

		$start = 0;
		if ($pageRecordPP != 'all') {
			$start = ($pageCurrentIndex - 1) * $pageRecordPP;
		}

		$recordTotal = $api->GetUsers(0, $pageSortInfo, true, $start, $pageRecordPP, $requestSearch, $requestGroupID);
		$records = $api->GetUsers(0, $pageSortInfo, false, $start, $pageRecordPP, $requestSearch, $requestGroupID);

		if (!empty($requestGroupID)) {
			$groupInformation = API_USERGROUPS::getRecordByID($requestGroupID);
		}

		for ($i = 0, $j = count($records); $i < $j; ++$i) {
			$records[$i]['processed_CreateDate'] = $this->PrintDate($records[$i]['createdate']);
			$records[$i]['processed_LastLoggedIn'] = ($records[$i]['lastloggedin'] ? $this->PrintDate($records[$i]['lastloggedin']) : '-');
		}

		// ----- Calculate pagination, this is using the older method of pagination
			$GLOBALS['PAGE'] = 'Users&PreserveQuickSearch=1' . (!empty($requestGroupID) ? "&GroupID={$requestGroupID}" : '');
			$GLOBALS['FormAction'] = 'Action=ProcessPaging&PreserveQuickSearch=1' . (!empty($requestGroupID) ? "&GroupID={$requestGroupID}" : '');

			$this->SetupPaging($recordTotal, $pageCurrentIndex, $pageRecordPP);
		// -----

		// ----- Print out HTML
			$tpl = GetTemplateSystem();
			$tpl->Assign('PAGE', $page);
			$tpl->Assign('records', $records);
			$tpl->Assign('permissions', $permissions);
			$tpl->Assign('quicksearchstring', $requestSearch);
			$tpl->Assign('groupInformation', $groupInformation);

			echo $tpl->ParseTemplate('Users', true);
//.........这里部分代码省略.........
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:users.php

示例4: Process

	/**
	* Process
	* Prints out the preview frames.
	*
	* @return Void Prints out the frame previews, doesn't return anything.
	*/
	function Process()
	{
		$design_rule_directory = IEM_PATH . '/resources/design_rules/';
		$design_rule_files = list_files($design_rule_directory);

		foreach ($design_rule_files as $design_rule) {
			$filename_parts = pathinfo($design_rule);
			if (isset($filename_parts['extension']) && $filename_parts['extension'] == 'php') {
				require_once $design_rule_directory . $design_rule;
			}
		}

		$valid_design_rules = array_keys($GLOBALS['Design_Rules']);

		$action = '';
		if (isset($_GET['Action'])) {
			$action = strtolower($_GET['Action']);
		}

		$sync_key = IEM::requestGetGET('sync', false);

		if ($sync_key) {
			$details = IEM::sessionGet('PreviewWindowHash');
			$details = $details[$sync_key];
		} else {
			$details = IEM::sessionGet('PreviewWindow');
		}

		if (empty($details)) {
			return;
		}

		switch ($action) {
			case 'top':
				$GLOBALS['SwitchOptions'] = '';

				if ($details['format'] == 't' || $details['format'] == 'b') {
					$GLOBALS['SwitchOptions'] .= '<option value="text">' . GetLang('TextPreview') . '</option>';
					$GLOBALS['HideDescription'] = "'';";
					$GLOBALS['ShowDescription'] = "none;";
				}

				if ($details['format'] == 'h' || $details['format'] == 'b') {
					$GLOBALS['SwitchOptions'] .= '<option value="html" SELECTED>' . GetLang('HTMLPreview') . '</option>';
					$GLOBALS['ShowDescription'] = "'';";
					$GLOBALS['HideDescription'] = "none;";
				}

				if ($details['showBroken']) {
					$designrules_description = '<a href="#" onClick="javascript: changeDisplay(\'html\');">'.GetLang('OriginalHTMLVersion').'</a>';
					foreach ($valid_design_rules as $design_rule) {
						$designrules_description .= '&nbsp;|&nbsp;<a href="#" onClick="javascript: changeDisplay(\'' . $design_rule . '\');">'.
													'<img border="0" src="images/email_clients/'.str_replace(' ', '_', $design_rule).'.gif" />&nbsp;'.$design_rule.
													'</a>';
					}
					$GLOBALS['DesignRules_Description'] = $designrules_description;
				} else $GLOBALS['DesignRules_Description'] = '';

				$this->ParseTemplate('Preview_Window_TopFrame', false, false);
			break;

			case 'brokenrules':
				$content = '';
				if (isset($details['htmlcontent'])) {
					$content = $details['htmlcontent'];
				}

				$GLOBALS['BrokenRuleList'] = '';
				foreach ($valid_design_rules as $design_rule) {
					$GLOBALS['BrokenRuleList'] .= 	'<a name="broken_rule_'.$design_rule.'"></a>'.
													'<div class="designRule" rulename="'.$design_rule.'">'.
													'<div class="designRuleLoading"> '. sprintf(GetLang('DesignRules_LoadingRules'), $design_rule).
													'... &nbsp;<img src="images/loading.gif" alt="loading" />'.
													'</div>'.
													'</div>';
				}
				header('Content-type: text/html; charset="' . SENDSTUDIO_CHARSET . '"');
				$this->ParseTemplate('Design_Rules_Broken', false, false);
			break;

			case 'processeachrule':
				header('Content-type: text/html; charset="' . SENDSTUDIO_CHARSET . '"');
				$reqRuleName = isset($_POST['rulename'])? $_POST['rulename'] : null;
				if (in_array($reqRuleName, $valid_design_rules)) {
					$details = IEM::sessionGet('PreviewWindow');
					$contents = isset($details['htmlcontent'])? $details['htmlcontent'] : '';

					require_once(SENDSTUDIO_API_DIRECTORY . '/design_rules_check.php');
					$api = new Design_Rules_Check_API();
					$api->Load($reqRuleName);
					$api->Process($contents);

					$broken_rules = $api->GetBrokenRules();

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

示例5: Process

	/**
	* Process
	* Executes functions for the page that was requested
	*
	* @return Void Returns nothing
	*/
	function Process()
	{
		$user = GetUser();

		$action = $this->_getGETRequest('Action', '');
		$statstype = $this->_getGETRequest('statstype', null);
		$subaction = $this->_getGETRequest('subaction', '');


		if (isset($_GET['PerPageDisplay'])) {
			$perpage = $this->SetPerPage($_GET['PerPageDisplay']);
		} else {
			$perpage = $this->GetPerPage();
		}

		$statsapi = $this->GetApi('Stats');

		switch ($action) {
			case 'get_linkstats':
				$linksjson = array();

				$token_id = IEM::requestGetGET('token', false);
				$request_link = IEM::requestGetGET('link', false);

				if (!$token_id || !$request_link) {
					die();
				}

				$token_data = IEM::sessionGet($token_id);
				$statid = $token_data['statid'];
				$calendar_restrictions = $token_data['calendar_restrictions'];
				$chosen_link = (is_numeric($request_link) ? $request_link : 'a');

				// Total Clicks
				$linkclicks = $statsapi->GetClicks($statid, 0, 0, $chosen_link, $calendar_restrictions, true);
				$linkclicks = intval($linkclicks);

				$linksjson['linkclicks'] = $linkclicks;

				// Average Clicks
				$averageclicks = 0;

				$open_count = $statsapi->GetOpens($statid, 0, 0, true, $calendar_restrictions, true);
				$open_count = intval($open_count);

				if ($open_count != 0) {
					$averageclicks = $linkclicks / $open_count;
				}

				$linksjson['averageclicks'] = $this->FormatNumber($averageclicks, 3);

				// Click-through rate
				if (isset($token_data['summary']['emails_sent'])) {
					$sent_to = $token_data['summary']['emails_sent'];
				} else {
					$summary = $statsapi->GetNewsletterSummary($statid, true, 0);
					if (!isset($summary['htmlrecipients'])) {
                        $sent_to = $request_link == 'a' ?
                            $statsapi->GetRecipients($statid, 'autoresponder', 0, 1, $calendar_restrictions, true) :
                            0;
					} else {
						$sent_to = $summary['htmlrecipients'] + $summary['textrecipients'] + $summary['multipartrecipients'];
					}
				}

				$clicks = $statsapi->GetUniqueClickRecipients($statid,$calendar_restrictions,$chosen_link);

				if ($sent_to == 0) {
					$linksjson['clickthrough'] = '0%';
				} else {
					$linksjson['clickthrough'] = $this->FormatNumber($clicks / $sent_to * 100,2) . '%';
				}

				// Unique Clicks
				$uniqueclicks = $clicks;
				$linksjson['uniqueclicks'] = $uniqueclicks;

				echo "var linksjson = " . GetJSON($linksjson) . ";";
			break;

			case 'print':
				if ($statstype != 'a' && $statstype != 'n' && $statstype != 'l' && $statstype != 't') {
					exit;
				}

				switch ($statstype) {
					case 'a':
						$this->area = 'autoresponder';
					break;
					case 'n':
						$this->area = 'newsletter';
					break;
					case 'l':
						$this->area = 'list';
//.........这里部分代码省略.........
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:101,代码来源:remote_stats.php

示例6: unset

     }
     unset($tempUser);
 }
 // Include the 'page' we're working with and process it.
 // This is getting the page class from functions directory.
 // Starting from version 5.6, the page structure has been gradually moved.
 if ($newPage === false) {
     require_once SENDSTUDIO_FUNCTION_DIRECTORY . "/{$page}.php";
     $system = new $page();
     $system->Process();
     unset($system);
     // This is the new page structure
 } else {
     require_once IEM_PATH . "/pages/{$newPage}.class.php";
     $tempClassName = "page_{$newPage}";
     $tempAction = 'page_' . preg_replace('/[^\\w]/', '_', IEM::requestGetGET('action', 'index'));
     $tempPageObject = new $tempClassName();
     // Check if "action" exists
     if (!is_callable(array($tempPageObject, $tempAction))) {
         // page_index will alwas exists (albeit only returning a FALSE)
         $tempAction = 'page_index';
     }
     // Call the function specified by "action" parameter
     $tempOutput = $tempPageObject->{$tempAction}();
     // TODO other return value have no effect at the moment.
     // Currently it only prints out a string
     if (is_string($tempOutput)) {
         echo $tempOutput;
     }
     // Call the page class destructor if it wants to cleanup anything
     unset($tempPageObject);
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:init.php

示例7: IEM_DefaultVariables

 /**
  * Enter description here...
  *
  * @return Void Does not return anything
  * @todo phpdoc
  */
 private function IEM_DefaultVariables()
 {
     static $variables = null;
     if (is_null($variables)) {
         $IEM = array('User' => GetUser(), 'ApplicationTitle' => GetLang('ApplicationTitle'), 'PageTitle' => GetLang('PageTitle'), 'CurrentPage' => IEM::requestGetGET('Page', IEM::requestGetGET('page', '')), 'ApplicationLogoImage' => APPLICATION_LOGO_IMAGE, 'ApplicationFavicon' => APPLICATION_FAVICON, 'InfoTips' => IEM::enableInfoTipsGet());
         list($IEM['LicenseError'], $IEM['LicenseMessage']) = sesion_start();
         IEM::sessionSet('LicenseError', $IEM['LicenseError']);
         if (!$IEM['LicenseError'] && isset($GLOBALS['ProductEdition'])) {
             $IEM['ApplicationTitle'] .= sprintf(GetLang('ApplicationTitleEdition'), $GLOBALS['ProductEdition']);
         }
         list($IEM['MenuLinks'], $IEM['TextLinks']) = $this->IEM_Menu();
         $variables = $IEM;
     }
     return $variables;
 }
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:21,代码来源:InterspireTemplate.class.php

示例8: _handleSubmitAction

	private function _handleSubmitAction()
	{
		// don't escape
		$template_dir = SENDSTUDIO_BASE_DIRECTORY . '/addons/surveys/templates';
		$this->_template = 	 GetTemplateSystem($template_dir);

		$this->_template->DefaultHtmlEscape = false;

		$formId      = (int) IEM::requestGetGET('formId');
		$postWidgets = IEM::requestGetPOST('widget');

		// If there are files, take the values and place them in the $postWidgets array so they can
		// get validated and entered into the response values in the same manner. Uploads will be
		// handled separately.

		if (isset($_FILES['widget'])) {
			foreach ($_FILES['widget']['name'] as $widgetId => $widget) {
				foreach ($widget as $fields) {
					foreach ($fields as $fieldId => $field) {
						$postWidgets[$widgetId]['field'][$fieldId]['value'] = 'file_' . $field['value'];
					}
				}
			}
		}

		// If the form and widgets weren't posted in the format we require then redirect back
		if (!$formId) {
			$this->redirectToReferer();
		}

		$surveyApi = $this->getApi();
		$surveyApi->Load($formId);
		$surveyData = $surveyApi->GetData();

		$errors       = 0;
		$widgets      = $surveyApi->getWidgets($formId);
		$widgetErrors = array();


		/****  START OF ERROR VALIDATION ****/

		// compile a list of widget ids so we can check the posted widgets against a list of
		// valid widget ids


		foreach ($widgets as $widgetKey => $widget) {

			if (!isset($widgetErrors[$widget['id']])) {
				$widgetErrors[$widget['id']] = array();
			}

			// validate required fields
			if ($widget['is_required']) {
				// the widget is assumed blank until one of it's fields is found not blank
				$isBlank = true;
				$isOther = false;


				// make sure the required widget was even posted

				if (isset($postWidgets[$widget['id']])) {
					foreach ($postWidgets[$widget['id']]['field'] as $field) {
						if (isset($field['value'])) {
							$values = (array) $field['value'];

							foreach ($values as $value) {

								// get the value of an "other" field if it is one, otherwise just grab
								// the normal value
								if ($value == '__other__') {
									$isOther = true;
									$value   = $field['other'];
								}

								// make sure the value isn't blank
								if ($this->_validateIsBlank($value) !== true) {
									$isBlank = false;
								}
							}
						}
					}
				}

				// if the widget is blank, flag an error
				if ($isBlank) {
					if ($isOther) {
						$error = GetLang('Addon_Surveys_ErrorRequiredOther');
					} else {
						$error = GetLang('Addon_Surveys_ErrorRequired');
					}
					$widgetErrors[$widget['id']][] = $error;
					$errors++;
				}
				
				if ($widget['type'] == 'file') {
					foreach ($postWidgets[$widget['id']]['field'] as $fieldid) {
						if (isset($fieldid['value'])) {$uploaded_file = $fieldid['value'];break;}
					}
					if (empty($uploaded_file) || $uploaded_file == "file_") {
						$error = GetLang('Addon_Surveys_ErrorRequired');
//.........这里部分代码省略.........
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:101,代码来源:surveys_submit.php

示例9: page_editGroup

	/**
	 *
	 * @return unknown_type
	 * @todo phpdocs
	 */
	public function page_editGroup()
	{
		$id = IEM::requestGetGET('GroupID', 0, 'intval');

		$record = array();
		if (!empty($id)) {
			$record = API_USERGROUPS::getRecordByID($id);
		}

		$this->printEditor($record);
		return;
	}
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:17,代码来源:usersgroups.php

示例10: Process

	/**
	* Process
	* All the action happens here.
	* If you are not logged in, it will print the login form.
	* Submitting that form will then try to authenticate you.
	* If you are successfully authenticated, you get redirected back to the main index page (quickstats etc).
	* Otherwise, will show an error message and the login form again.
	*
	* @see ShowLoginForm
	* @uses AuthenticationSystem::Authenticate()
	*
	* @return Void Doesn't return anything. Checks the action and passes it off to the appropriate area.
	*/
	function Process()
	{
		$action = IEM::requestGetGET('Action', '', 'strtolower');
		switch ($action) {
			case 'forgotpass':
				$this->ShowForgotForm();
			break;

			case 'changepassword':
				if (!IEM::sessionGet('ForgotUser')) {
					$this->ShowForgotForm('login_error', GetLang('BadLogin_Link'));
					break;
				}

				$userapi = GetUser(-1);
				$loaded = $userapi->Load(IEM::sessionGet('ForgotUser'));

				if (!$loaded) {
					$this->ShowForgotForm('login_error', GetLang('BadLogin_Link'));
					break;
				}

				$password = IEM::requestGetPOST('ss_password', false);
				$confirm = IEM::requestGetPOST('ss_password_confirm', false);

				if ($password == false || ($password != $confirm)) {
					$this->ShowForgotForm_Step2($userapi->Get('username'), 'login_error', GetLang('PasswordsDontMatch'));
					break;
				}

				$userapi->password = $password;
				$userapi->Save();

				$code = md5(uniqid(rand(), true));

				$userapi->ResetForgotCode($code);

				$this->ShowLoginForm('login_success', GetLang('PasswordUpdated'));
			break;

			case 'sendpass':
				$user = GetUser(-1);
				$username = IEM::requestGetPOST('ss_username', '');

				/**
				 * Fix vulnerabilities with MySQL
				 * Documented here: http://www.suspekt.org/2008/08/18/mysql-and-sql-column-truncation-vulnerabilities/
				 *
				 * Basically MySQL is truncating values in a column
				 */
					$username = preg_replace('/\s+/', ' ', $username);
					$username = trim($username);
				/**
				 * -----
				 */

				$founduser = $user->Find($username);
				if (!$founduser) {
					$this->ShowForgotForm('login_error', GetLang('BadLogin_Forgot'));
					break;
				}

				$user->Load($founduser, false);

				$code = md5(uniqid(rand(), true));

				$user->ResetForgotCode($code);

				$link = SENDSTUDIO_APPLICATION_URL . '/admin/index.php?Page=Login&Action=ConfirmCode&user=' . $founduser . '&code=' . $code;

				$message = sprintf(GetLang('ChangePasswordEmail'), $link);

				$email_api = $this->GetApi('Email');
				$email_api->Set('CharSet', SENDSTUDIO_CHARSET);
				$email_api->Set('Multipart', false);
				$email_api->AddBody('text', $message);
				$email_api->Set('Subject', GetLang('ChangePasswordSubject'));

				$email_api->Set('FromAddress', SENDSTUDIO_EMAIL_ADDRESS);
				$email_api->Set('ReplyTo', SENDSTUDIO_EMAIL_ADDRESS);
				$email_api->Set('BounceAddress', SENDSTUDIO_EMAIL_ADDRESS);

				$email_api->SetSmtp(SENDSTUDIO_SMTP_SERVER, SENDSTUDIO_SMTP_USERNAME, @base64_decode(SENDSTUDIO_SMTP_PASSWORD), SENDSTUDIO_SMTP_PORT);

				$user_fullname = $user->Get('fullname');

				$email_api->AddRecipient($user->emailaddress, $user_fullname, 't');
//.........这里部分代码省略.........
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:101,代码来源:login.php

示例11: Process

	/**
	* Process
	* Works out where you are in the process and prints / processes the appropriate step.
	*
	* @see GetUser
	* @see User_API::HasAccess
	* @see PrintHeader
	* @see PopupWindows
	* @see PreviewWindow
	* @see ManageTemplates
	* @see EditTemplate
	* @see DisplayEditTemplate
	* @see ConvertContent
	* @see CreateTemplate
	*
	* @return Void Doesn't return anything. Handles processing and that's it.
	*/
	function Process()
	{
		$GLOBALS['Message'] = '';

		$action = strtolower(IEM::requestGetGET('Action', ''));
		$user = GetUser();

		if ($action == 'processpaging') {
			$this->SetPerPage($_GET['PerPageDisplay']);
			$action = '';
		}

		// map the actions to the permissions required to do them
		$effective_permission = array(
			'' => null,
			'activate' => 'approve',
			'activateglobal' => 'global',
			'addtemplate' => 'create',
			'builtin' => 'builtin',
			'change' => 'edit',
			'complete' => 'view',
			'copy' => 'view',
			'create' => 'create',
			'deactivate' => 'approve',
			'deactivateglobal' => 'global',
			'edit' => 'edit',
			'manage' => null,
			'save' => 'edit',
			'step1' => 'view',
			'view' => 'view',
			'viewcompatibility' => null,
			);

		$access = false;

		if (!isset($_GET['id'])) {
			// we are not dealing with a particular template
			$access = $user->HasAccess('Templates', $effective_permission[$action]);
		} else if (!is_numeric($_GET['id'])) {
			// we are dealing with a particular built-in template
			$access = $user->HasAccess('Templates', 'builtin');
		} else {
			// we are dealing with a particular user template
			$id = intval($_GET['id']);
			if ($id == 0 && $action == 'create') {
				// we are saving/creating a new template
				$access = $user->HasAccess('Templates', $action);
			} else {
				$templates = array_keys($user->GetTemplates());
				if (in_array($id, $templates)) {
					// we at least have 'view' access
					if ($effective_permission[$action] == 'view') {
						$access = true;
					} else {
						$access = $this->_haveTemplateAccess($id, $effective_permission[$action]);
					}
				}
			}
		}

		$popup = (in_array($action, $this->PopupWindows)) ? true : false;
			if ($action != 'viewcompatibility') {
			$this->PrintHeader($popup);
		}

		if (!$access) {
			$this->DenyAccess();
		}

		switch ($action) {
			case 'viewcompatibility':
				$template_info = IEM::sessionGet('Templates'.$_GET['id']);

				$html = (isset($_POST['myDevEditControl_html'])) ? $_POST['myDevEditControl_html'] : false;
				$text = (isset($_POST['TextContent'])) ? $_POST['TextContent'] : false;
				$showBroken = isset($_REQUEST['ShowBroken']) && $_REQUEST['ShowBroken'] == 1;
				$details = array();
				$details['htmlcontent'] = $html;
				$details['textcontent'] = $text;
				$details['format'] = $template_info['Format'];

				$this->PreviewWindow($details, $showBroken);
				exit;
//.........这里部分代码省略.........
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:templates.php

示例12: GetPageName

	/**
	* GetPageName
	* Used in remembering each section's paging settings.
	*
	* @see GetPerPage
	* @see SetPerPage
	*
	* @return String The name of the page/section in lower case, e.g. 'subscribers' or 'unknown' if not found.
	*/
	function GetPageName()
	{
		$page = IEM::requestGetGET('Page', '');
		if (empty($page)) {
			$page = IEM::requestGetGET('page', 'unknown');
		} else {
			$page = strtolower($page);
		}

		$action = IEM::requestGetGET('Action', IEM::requestGetGET('action', false));

		if ($action == 'ProcessPaging' && isset($_GET['SubAction'])) {
			$action = strtolower($_GET['SubAction']);
		}

		if ($page == 'stats' && !$action) {
			$action = 'newsletters';
		}

		// see bugid:2195 for why we handle this special case with subscribers
		if ($page == 'stats' || ($page == 'subscribers' && $action == 'banned')) {
			$page .= '_'.$action;
		}

		return $page;
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:35,代码来源:sendstudio_functions.php

示例13: EditSubscriber

	/**
	* EditSubscriber
	* Prints the 'edit subscriber' form and all appropriate options including custom fields.
	*
	* @param Int $listid The list the subscriber is on. This is checked to make sure the user has 'edit' access to the list before anything else.
	* @param Int $subscriberid The subscriberid to edit.
	* @param Int $segmentid The segment the subscriber is on.
	* @param String $msgtype The heading to show when editing a subscriber. This can be either error or success. Used with $msg to display something.
	* @param String $msg The message to display in the heading. If this is not present, no message is displayed.
	*
	* @see GetApi
	* @see Subscribers_API::GetCustomFieldSettings
	* @see Lists_API::GetCustomFields
	* @see Lists_API::Load
	* @see Lists_API::GetListFormat
	*
	* @return Void Doesn't return anything. Prints out the edit form and that's it.
	*/
	function EditSubscriber($listid = 0, $subscriberid = 0, $segmentid = 0, $msgtype = 'Error', $msg = false)
	{
		$user = GetUser();
		$access = $user->HasAccess('Subscribers', 'Edit');
		if (!$access) {
			$this->DenyAccess();
			return;
		}

		$this->SetupGoogleCalendar();

		$search_info = IEM::sessionGet('Search_Subscribers');

		$GLOBALS['list'] = $listid;

		if ($msg && $msgtype) {
			switch (strtolower($msgtype)) {
				case 'success':
					$GLOBALS['Success'] = $msg;
					$GLOBALS['Message'] = $this->ParseTemplate('SuccessMsg', true, false);
				break;
				default:
					$GLOBALS['Error'] = $msg;
					$GLOBALS['Message'] = $this->ParseTemplate('ErrorMsg', true, false);
			}
		}

		$SubscriberApi = $this->GetApi('Subscribers');

		/**
		 * Get Subscriber record from the database
		 */
			$adminAccess = false;

			// If this user is an admin/list admin/list admintype == a then give permission
			if ($user->Admin() || $user->ListAdminType() == 'a' || $user->ListAdmin()) {
				$adminAccess = true;
			}

			// Get subscribers from list
			if ($segmentid == 0) {
				if (!$adminAccess && !$SubscriberApi->CheckPermission($user->userid, $subscriberid)) {
					$this->DenyAccess();
					return;
				}

				$subscriberinfo = $SubscriberApi->LoadSubscriberList($subscriberid, $listid);


			// Get subscribers from segment
			} else {
				if (!$adminAccess) {
					$segmentapi = $this->GetApi('Segment', true);
					$segmentapi->Load($segmentid);

					if ($segmentapi->ownerid != $user->userid && !$user->HasAccess('Segments', 'View', $segmentid)) {
						$this->DenyAccess();
						return;
					}
				}

				$subscriberinfo = $SubscriberApi->LoadSubscriberSegment($subscriberid, $segmentid);
				$GLOBALS['SegmentID'] = $segmentid;
			}
		/**
		 * -----
		 */

		// hmm, the subscriber doesn't exist or can't be loaded? show an error.
		if (empty($subscriberinfo)) {
			$GLOBALS['ErrorMessage'] = GetLang('SubscriberDoesntExist_Edit');
			$this->DenyAccess();
			return;
		}

		$list_api = $this->GetApi('Lists');
		$list_api->Load($listid);

		// Log this to "User Activity Log"
		if (IEM::requestGetGET('Action', '', 'strtolower') != 'save') {
			IEM::logUserActivity($_SERVER['REQUEST_URI'], 'images/contacts_view.gif', $subscriberinfo['emailaddress']);
		}
//.........这里部分代码省略.........
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:101,代码来源:subscribers_edit.php

示例14: 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

示例15: _TriggerEmailsStats_View_Tab8

		/**
		 * _TriggerEmailsStats_View_Tab8
		 * "Tab 8" of the trigger email statistics
		 *
		 * @param Array $record An associative array of the trigger email statistic record
		 * @return Array Returns tab information that is used by TriggerEmailsStats_View method
		 *
		 * @see Stats::TriggerEmailsStats_View()
		 */
		function _TriggerEmailsStats_View_Tab8($record)
		{
			// ----- Sanitize and declare variables that is going to be used in this function
				$user 					= IEM::userGetCurrent();

				$pageRecordPP			= 0;
				$pageCurrentIndex		= IEM::requestGetGET('DisplayPagetriggerfailed', 1, 'intval');
				$calendarRestrictions	= array_key_exists('recipients', $this->CalendarRestrictions) ? $this->CalendarRestrictions['recipients'] : '';

				$requestAction			= isset($_GET['Action'])? strtolower($_GET['Action']) : '';

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

				$tabinfo				= array();
			// ----

			$tabinfo['intro'] = sprintf(GetLang('TriggerEmails_Stats_Failed_Intro'), $record['triggeremailsname']);

			// setup calendar
			$GLOBALS['TabID'] = '7';
			$this->SetupCalendar('Action=ProcessCalendar&SubAction=TriggerEmails&NextAction=View&tab=8&id=' . $record['triggeremailsid']);
			$tabinfo['calendar'] = $GLOBALS['Calendar'];
			unset($GLOBALS['TabID']);
			unset($GLOBALS['Calendar']);

			$tabinfo['record_count'] = intval($api->GetFailedList($record['triggeremailsid'], $pageCurrentIndex, $pageRecordPP, $calendarRestrictions, true));

			// Set up error message if no recipients has been found, do not proceed with the rest of the function
			if ($tabinfo['record_count'] == 0) {
				$tempMessage = 'TriggerEmails_Stats_Failed_Error_NoRecipientFound';

				if (!empty($calendarRestrictions)) {
					$tempMessage = 'TriggerEmails_Stats_Failed_Error_NoRecipientFound_CalendarProblem';
				}

				$GLOBALS['Error'] = GetLang($tempMessage);
				$tabinfo['message'] = $this->ParseTemplate('ErrorMsg', true, false);
				unset($GLOBALS['Error']);

				return $tabinfo;
			}

			// ----- Get "Record Per Page"
				if ($requestAction == 'processpaging') {
					$pageRecordPP = IEM::requestGetGET('PerPageDisplaytriggerfailed', 10, 'intval');
					if ($pageRecordPP == 0) {
						$pageRecordPP = 10;
					}
					$this->SetPerPage($pageRecordPP);
				}

				if ($pageRecordPP == 0) {
					$pageRecordPP = $this->GetPerPage();
				}
			// -----

			// ----- Get records from DB
				$tempStart = 0;
				if ($pageRecordPP != 'all') {
					$tempStart = ($pageCurrentIndex - 1) * $pageRecordPP;
				}

				$tabinfo['records'] = $api->GetFailedList($record['triggeremailsid'], $tempStart, $pageRecordPP, $calendarRestrictions, false, GetLang('TimeFormat'));
			// -----

			// ----- Calculate pagination, this is still using the older method of pagination
				$GLOBALS['PAGE'] = 'Stats&Action=TriggerEmails&SubAction=View&id=' . $record['triggeremailsid'] . '&tab=8';
				$GLOBALS['FormAction'] = 'Action=ProcessPaging&SubAction=TriggerEmails&NextAction=View&id=' . $record['triggeremailsid'] . '&tab=8';
				$GLOBALS['PPDisplayName'] = 'triggerfailed';

				$this->SetupPaging($tabinfo['record_count'], $pageCurrentIndex, $pageRecordPP);
				$tabinfo['pagination_top'] = $this->ParseTemplate('Paging', true);
				$tabinfo['pagination_bottom'] = $this->ParseTemplate('Paging_Bottom', true);

				unset($GLOBALS['PAGE']);
				unset($GLOBALS['FormAction']);
				unset($GLOBALS['PPDisplayName']);
			// -----

			return $tabinfo;
		}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:90,代码来源:stats.php


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