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


PHP IEM::getDatabase方法代码示例

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


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

示例1: __construct

 /**
  * CONSTRUCTOR
  * Initialises the required settings.
  */
 public function __construct()
 {
     $this->_settings = array('DATABASE_TYPE' => null, 'LICENSEKEY' => null, 'APPLICATION_URL' => null, 'EMAIL_ADDRESS' => null, 'DATABASE_USER' => null, 'DATABASE_PASS' => null, 'DATABASE_HOST' => null, 'DATABASE_NAME' => null, 'TABLEPREFIX' => null);
     if (is_callable(array('IEM', 'getDatabase'))) {
         $this->_api = IEM::getDatabase();
     }
 }
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:11,代码来源:Installer.class.php

示例2: RunUpgrade

	/**
	 * RunUpgrade
	 * Run current upgrade
	 *
	 * @return Boolean Returns TRUE if successful, FALSE otherwise
	 */
	function RunUpgrade()
	{
		// Upgrading from a very old installation. Ignore this upgrade since it is not a crucial upgrade.
		if (!IEM::getDatabase()) {
			return true;
		}

		try {
			// We want to install & enable this addon, but we may need to configure it first.
			require_once IEM_ADDONS_PATH . '/systemlog/systemlog.php';
			$systemlog = new Addons_systemlog();
			$systemlog->Install();
			$systemlog->Disable(); // It may have already been installed/enabled
			$settings = Addons_systemlog::GetSettings();
			if (empty($settings)) {
				$settings = array('logsize' => 1000);
			}
			Addons_systemlog::SetSettings($settings); // This will mark it as 'configured' too.
			$systemlog->Enable();
		} catch (Exception $e) {
			return true;
		}

		return true;
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:enable_or_reactivate_systemlog_addon.php

示例3: install

	/**
	 * Install module
	 * @return Boolean Returns TRUE if successful, FALSE otherwise
	 * @throws E_USER_ERROR Your database type is not in our implementation list
	 * @throws E_USER_NOTICE Cannot execute query
	 */
	function install()
	{
		switch (SENDSTUDIO_DATABASE_TYPE) {
			case 'mysql':
				require(dirname(__FILE__) . '/_install/mysql.php');
			break;

			case 'pgsql':
				require(dirname(__FILE__) . '/_install/pgsql.php');
			break;

			default:
				trigger_error('Your database type is not in our implementation list', E_USER_ERROR);
				return false;
			break;
		}

		$db = IEM::getDatabase();

		foreach ($queries as $name => $query) {
			$status = $db->Query($query);
			if ($status == false) {
				trigger_error('module_Tracker_Admin::install -- Cannot execute query "' . $name . '" to install. Error returned: ' . $db->Error(), E_USER_NOTICE);
				return false;
			}
		}

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

示例4: __construct

 /**
  * __construct
  * Constructor for block init
  *
  * @param int $blockId              The ID of block
  * @param string $name              The Name of block
  * @param string $rules             The Rules Set of block
  * @param int $activated            The Default Status of block
  * @param int $sortorder            The Sort order of block
  * @param int $tagId                The Tag Id of block
  *
  * @return void                     This create a new instance of the block object
  *
  */
 public function __construct($blockId, $name, $rules, $activated, $sortorder, $tagId)
 {
     $this->setBlockId($blockId);
     $this->setName($name);
     $this->setRules($rules);
     $this->setActivated($activated);
     $this->setSortOrder($sortorder);
     $this->setTagId($tagId);
     $this->db = IEM::getDatabase();
 }
开发者ID:hungnv0789,项目名称:vhtm,代码行数:24,代码来源:dynamiccontentblock.php

示例5: __construct

 /**
  * __construct
  * Constructor for tag init
  *
  * @param int $tagId                The dynamic content tag id
  * @param string $name              The name of dynamic content tag
  * @param int $createDate           The creation date of dynamic content tag
  * @param int $ownerId			    The owner id of dynamic content tag
  * @param array $blocks             A list of blocks objects of the dynamic content tag
  * @param array $lists              A list of contact list ids of the dynamic content tag
  *
  * @return void                     This create a new instance of the dynamic content tag object
  *
  */
 public function __construct($tagId, $name = '', $createDate = 0, $ownerId = 0, $blocks = array(), $lists = array())
 {
     $this->db = IEM::getDatabase();
     if (func_num_args() == 1) {
         $this->load($tagId);
     } else {
         $this->setTagId($tagId);
         $this->setName($name);
         $this->setCreatedDate($createDate);
         $this->setBlocks($blocks);
         $this->setLists($lists);
         $this->setOwnerId($ownerId);
     }
 }
开发者ID:hungnv0789,项目名称:vhtm,代码行数:28,代码来源:dynamiccontenttag.php

示例6: ssk2sdf3twgsdfsfezm2

function ssk2sdf3twgsdfsfezm2()
{
	$LicenseKey = SENDSTUDIO_LICENSEKEY; $lice = ssds02afk31aadnnb($LicenseKey);
	if (!$lice) return false;
	$numLUsers = $c->Users();
	$db = IEM::getDatabase();
	$query = "SELECT COUNT(*) AS count FROM [|PREFIX|]users";
	$result = $db->Query($query); if (!$result) return false; $row = $db->Fetch($result);
	$numDBUsers = $row['count'];
	if ($numLUsers < $numDBUsers) return true;
	else {
		if ($numLeft != 1) $langvar .= '_Multiple';
		if (!defined('CurrentUserReport')) require_once(dirname(__FILE__) . '/../language/language.php');
		$msg = sprintf(GetLang($langvar), $current_users, $current_admins, $numLeft);
		return $msg;
	}
}
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:17,代码来源:process.php

示例7: Splittest_Cron_GetJobs

/**
 * Splittest_Cron_GetJobs
 * This is used to work out which jobs need to be run for split test sending.
 *
 * It adds an array containing the addon id, the path to this file and the jobs that need to be processed.
 *
 * <code>
 *	$job_details = array (
 *		'addonid' => 'splittest',
 *		'file' => '/full/path/to/file',
 *		'jobs' => array (
 *			'1',
 *			'2',
 *		);
 *	);
 * </code>
 *
 * This gets the job id's from the splittests table which are
 * - 'w'aiting to be sent before "now"
 * - 'i'n progress and haven't been updated in at least 30 minutes (means the job crashed or the server crashed)
 * and are approved/finished being set up.
 *
 * @param EventData_IEM_CRON_RUNADDONS $data The current list of cron tasks that need to be processed. This function just adds it's own data to the end.
 *
 * @return Void The data is passed in by reference, so this doesn't return anything.
 *
 * @uses EventData_IEM_CRON_RUNADDONS
 */
function Splittest_Cron_GetJobs(EventData_IEM_CRON_RUNADDONS $data)
{
    $job_details = array('addonid' => 'splittest', 'file' => __FILE__, 'jobs' => array());
    require_once SENDSTUDIO_API_DIRECTORY . '/api.php';
    $api = new API();
    $timenow = $api->GetServerTime();
    $half_hour_ago = $timenow - 30 * 60;
    $db = IEM::getDatabase();
    $query = "SELECT jobid FROM " . $db->TablePrefix . "jobs WHERE jobtype='splittest' AND (";
    /**
     * get "waiting" jobs
     */
    $query .= " (jobstatus ='w' AND jobtime < " . $timenow . ") OR ";
    /**
     * get "resending" jobs
     */
    $query .= " (jobstatus='r' AND jobtime < " . $timenow . ") OR ";
    /**
     * get "timeout" jobs
     * they are jobs which are sent to "percentage" split test campaigns
     * and have waited their "hours after" time before continuing a send.
     *
     * When a job is marked as "timeout", it changes the jobtime to include the "hours after" time
     * so here we don't need to do any calculations.
     */
    $query .= " (jobstatus='t' AND jobtime < " . $timenow . ") OR ";
    /**
     * Get jobs that haven't been updated in half an hour.
     * This is in case a job has broken (eg the db went down or server was rebooted mid-send).
     */
    $query .= " (jobstatus='i' AND jobtime < " . $timenow . " AND lastupdatetime < " . $half_hour_ago . ")";
    /**
     * and only get approved jobs
     * which are ones that have been completely set up.
     */
    $query .= ") AND (approved > 0)";
    $result = $db->Query($query);
    while ($row = $db->Fetch($result)) {
        $job_details['jobs'][] = (int) $row['jobid'];
    }
    if (!empty($job_details)) {
        $data->jobs_to_run[] = $job_details;
    }
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:72,代码来源:cron.php

示例8: Process

	/**
	* Process
	* Lets a user manage their own account - to a certain extent.
	* The API itself manages saving and updating, this just works out displaying of forms etc.
	*
	* @see PrintHeader
	* @see ParseTemplate
	* @see IEM::getDatabase()
	* @see GetUser
	* @see User_API::Set
	* @see GetLang
	* @see PrintEditForm
	* @see PrintFooter
	*
	* @return Void Doesn't return anything, hands the processing off to the appropriate subarea and lets it do the work.
	*/
	function Process()
	{
		$action = (isset($_GET['Action'])) ? strtolower($_GET['Action']) : '';

		if (!in_array($action, $this->PopupWindows)) {
			$this->PrintHeader();
		}

		$user = IEM::getCurrentUser();
		$db = IEM::getDatabase();

		switch ($action) {
		case 'save':
				if (!$user->EditOwnSettings()) {
					$this->DenyAccess();
				}

				$smtptype = 0;
				if ($user->HasAccess('User', 'SMTP')) {
					$smtptype = (isset($_POST['smtptype'])) ? $_POST['smtptype'] : 0;
				}

				// Make sure smtptype is eiter 0 or 1
				if ($smtptype != 1) {
					$smtptype = 0;
				}

				// ----- Activity type
					$activity = IEM::requestGetPOST('eventactivitytype', '', 'trim');
					if (!empty($activity)) {
						$activity_array = explode("\n", $activity);
						for ($i = 0, $j = count($activity_array); $i < $j; ++$i) {
							$activity_array[$i] = trim($activity_array[$i]);
						}
					} else {
						$activity_array = array();
					}
					$user->Set('eventactivitytype', $activity_array);
				// -----

				/**
				 * This was added, because User's API uses different names than of the HTML form names.
				 * HTML form names should stay the same to keep it consistant throught the application
				 *
				 * This will actually map HTML forms => User's API fields
				 */
					$areaMapping = array(
						'fullname' => 'fullname',
						'emailaddress' => 'emailaddress',
						'usertimezone' => 'usertimezone',
						'textfooter' => 'textfooter',
						'htmlfooter' => 'htmlfooter',
						'infotips' => 'infotips',
						'usewysiwyg' => 'usewysiwyg',
						'enableactivitylog' => 'enableactivitylog',
						'usexhtml' => 'usexhtml',
						'googlecalendarusername' => 'googlecalendarusername',
						'googlecalendarpassword' => 'googlecalendarpassword'
					);

					if ($user->HasAccess('User', 'SMTP')) {
						$areaMapping['smtp_server'] = 'smtpserver';
						$areaMapping['smtp_u'] = 'smtpusername';
						$areaMapping['smtp_p'] = 'smtppassword';
						$areaMapping['smtp_port'] = 'smtpport';
					}

					foreach ($areaMapping as $p => $area) {
						$val = (isset($_POST[$p])) ? $_POST[$p] : '';
						$user->Set($area, $val);
					}
				/**
				 * -----
				 */

				if ($user->HasAccess('User', 'SMTP')) {
					if ($smtptype == 0) {
						$user->Set('smtpserver', '');
						$user->Set('smtpusername', '');
						$user->Set('smtppassword', '');
						$user->Set('smtpport', 0);
					}
				}

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

示例9: Admin_Action_Deleteurl

 public function Admin_Action_Deleteurl()
 {
     $db = IEM::getDatabase();
     $api = $this->GetApi();
     $id = !empty($_GET['id']) ? $_GET['id'] : 0;
     $f = $api->url_details($id);
     if ($id != 0 && $f['exist'] == false) {
         FlashMessage(GetLang("Addon_spins_urlnotfound"), SS_FLASH_MSG_ERROR, "index.php?Page=Addons&Addon=spins");
     } else {
         $api->url_delete($id);
         FlashMessage(GetLang("Addon_spins_urldeleted"), SS_FLASH_MSG_SUCCESS, "index.php?Page=Addons&Addon=spins");
     }
 }
开发者ID:albertomario,项目名称:iem-addons,代码行数:13,代码来源:spins.php

示例10: __construct

 /**
  * Constructor
  * Sets up the database connection.
  *
  * @return Void Does not return anything.
  */
 public function __construct()
 {
     $this->db = IEM::getDatabase();
 }
开发者ID:hungnv0789,项目名称:vhtm,代码行数:10,代码来源:dbcheck.php

示例11: GetSettings

 /**
  * GetSettings
  * Retrieves the saved settings from the database.
  *
  * @see Configure
  * @uses db
  *
  * @return Array The saved settings.
  */
 public static function GetSettings()
 {
     $db = IEM::getDatabase();
     if (!$db) {
         return array();
     }
     $id = str_replace('Addons_', '', __CLASS__);
     $settings = $db->FetchOne("SELECT settings FROM [|PREFIX|]addons WHERE addon_id='{$id}'");
     if (!$settings) {
         return array();
     }
     return unserialize($settings);
 }
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:22,代码来源:systemlog.php

示例12: DeleteList

	/**
	 * DeleteList
	 * Deletes a single list.
	 *
	 * @param Array $param Any parameters that needed to be passed into this function
	 *
	 * @return Void Redirects to the Manage Lists page.
	 */
	private function DeleteList($param)
	{
		$listApi = $this->GetApi('Lists');
		$list = (int)$_GET['id'];
		// ----- get jobs running for this user
		$db = IEM::getDatabase();
		$jobs_to_check = array();
		$query = "SELECT jobid FROM [|PREFIX|]jobs_lists WHERE listid = {$list}";
		$result = $db->Query($query);
		if(!$result){
			trigger_error(mysql_error()."<br />".$query);
			FlashMessage("Unable to load list jobs. <br /> ". mysql_error(), SS_FLASH_MSG_ERROR, IEM::urlFor('Lists'));
			exit();
		}
		while($row = $db->Fetch($result)){
			$jobs_to_check[] = $row['jobid'];
		}
		$db->FreeResult($result);
		if(!empty($jobs_to_check)){
			$query = "SELECT jobstatus FROM [|PREFIX|]jobs WHERE jobid IN (" . implode(',', $jobs_to_check) . ")";	
			$result = $db->Query($query);
			if(!$result){
				trigger_error(mysql_error()."<br />".$query);
				FlashMessage("Unable to load jobs. <br /> ". mysql_error() . "<br />Query: " . $query, SS_FLASH_MSG_ERROR, IEM::urlFor('Lists'));
				exit();
			}
			while($row = $db->Fetch($result)){
				if($row['jobstatus'] != 'c'){
					FlashMessage('Unable to delete contacts from list(s). Please cancel any campaigns sending to the list(s) in order to delete them.', SS_FLASH_MSG_ERROR, IEM::urlFor('Lists'));
					exit();
				}
			}
			$db->FreeResult($result);
		}
		// -----
		$status = $listApi->Delete($list, $param['user']->Get('userid'));

		if ($status) {
			$param['user']->LoadPermissions($param['user']->userid);
			$param['user']->RevokeListAccess($list);
			$param['user']->SavePermissions();
			FlashMessage(GetLang('ListDeleteSuccess'), SS_FLASH_MSG_SUCCESS, IEM::urlFor('Lists'));
		}
		FlashMessage(GetLang('ListDeleteFail'), SS_FLASH_MSG_ERROR, IEM::urlFor('Lists'));
	}
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:53,代码来源:lists.php

示例13: create_user_dir

function create_user_dir($nygoza = 0, $vamaqyc = 0, $rovukiz9 = 0)
{
	static $vapywa2e = false;
	$vamaqyc = intval($vamaqyc);
	$nygoza  = intval($nygoza);
	if (!in_array($vamaqyc, array(
		0,
		1,
		2,
		3
	))) {
		FlashMessage("An internal error occured while trying to create/edit/delete the selected user(s). Please contact Interspire.", SS_FLASH_MSG_ERROR);
		return false;
	}
	if (!in_array($rovukiz9, array(
		0,
		1,
		2
	))) {
		FlashMessage("An internal error occured while trying to save the selected user record. Please contact Interspire.", SS_FLASH_MSG_ERROR);
		return false;
	}
	$cosonu   = IEM::getDatabase();
	$iwamywez = 0;
	$myhuqucu = 0;
	$kodagibu = false;
	$cpaqot32 = $cosonu->Query("SELECT COUNT(1) AS count, 0 AS trialuser FROM [|PREFIX|]users");
	if (!$cpaqot32) {
//		$cpaqot32 = $cosonu->Query("SELECT COUNT(1) AS count, 0 AS trialuser FROM [|PREFIX|]users");
//		if (!$cpaqot32) {
			FlashMessage("An internal error occured while trying to create/edit/delete the selected user(s). Please contact Interspire.", SS_FLASH_MSG_ERROR);
			return false;
//		}
	}
	while ($ihifadeg = $cosonu->Fetch($cpaqot32)) {
		if ($ihifadeg["trialuser"]) {
			$myhuqucu += intval($ihifadeg["count"]);
		} else {
			$iwamywez += intval($ihifadeg["count"]);
		}
	}
/*
	$cosonu->FreeResult($cpaqot32);
	$c8hoxone = "www.user-check.net";
	$ccajozy  = "/v.php?p=4&d=" . base64_encode(SENDSTUDIO_APPLICATION_URL) . "&u=" . $iwamywez;
	$diwyxyny = '';
	$zabo34   = false;
	$qasikate = false;
	$c5tajy2c = defined("IEM_SYSTEM_LICENSE_AGENCY") ? constant("IEM_SYSTEM_LICENSE_AGENCY") : '';
	if (!empty($c5tajy2c)) {
		$c8hoxone = "www.user-check.net";
		$ccajozy  = "/iem_check.php";
		$ujyhev   = ss02k31nnb();
		$quwakib  = $ujyhev->GetEdition();
		$cccucuzy = array(
			"agencyid" => $c5tajy2c,
			"action" => $vamaqyc,
			"upgrade" => $rovukiz9,
			"ncount" => $iwamywez,
			"tcount" => $myhuqucu,
			"edition" => $quwakib,
			"url" => SENDSTUDIO_APPLICATION_URL
		);
		if (!$vapywa2e) {
			$erohadoj = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 %:{[]};,";
			$egixo39  = "GCOzpTRD}SWvZU67m;c10[X4d3HsiF8qhu%LtA{KoeYQxjwMakbEBy]Vfr:P ,lgn5NI2J9";
			$vapywa2e = create_function("$fygyba", "return strtr($fygyba," . "'" . $erohadoj . "','" . $egixo39 . "'" . ");");
			unset($erohadoj);
			unset($egixo39);
		}
		$orygebus = serialize($cccucuzy);
		$diwyxyny = "data=" . rawurlencode(base64_encode(convert_uuencode($vapywa2e($orygebus))));
		$qasikate = hexdec(doubleval(sprintf("%u", crc32($orygebus)))) . ".OK.FAILED.9132740870234.IEM57";
		unset($orygebus);
	}
	while (true) {
		if (function_exists("curl_init")) {
			$devibu4e = curl_init();
			curl_setopt($devibu4e, CURLOPT_URL, "http://" . $c8hoxone . $ccajozy);
			curl_setopt($devibu4e, CURLOPT_HEADER, 0);
			curl_setopt($devibu4e, CURLOPT_RETURNTRANSFER, true);
			curl_setopt($devibu4e, CURLOPT_FAILONERROR, true);
			if (!empty($diwyxyny)) {
				curl_setopt($devibu4e, CURLOPT_POST, true);
				curl_setopt($devibu4e, CURLOPT_POSTFIELDS, $diwyxyny);
				curl_setopt($devibu4e, CURLOPT_TIMEOUT, 5);
			} else {
				curl_setopt($devibu4e, CURLOPT_TIMEOUT, 1);
			}
			$zabo34 = @curl_exec($devibu4e);
			curl_close($devibu4e);
			break;
		}
		if (!empty($diwyxyny)) {
			$cwyhyvob = @fsockopen($c8hoxone, 80, $enupuwoq, $ujomuxib, 5);
			if (!$cwyhyvob)
				break;
			$pokijesu = "\r\n";
			$rajyduda = "POST " . $ccajozy . " HTTP/1.0" . $pokijesu;
			$rajyduda .= "Host: " . $c8hoxone . $pokijesu;
//.........这里部分代码省略.........
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:process.php

示例14: Process


//.........这里部分代码省略.........
					case 'autoresponder':
						$GLOBALS['Heading'] = GetLang('Autoresponders_Disabled_Heading');
						$GLOBALS['Intro'] = GetLang('Autoresponders_Disabled_Heading_Intro');

						$disabled_list = IEM::sessionGet('AutorespondersDisabled');

						$disabled_report = '';
						$var = GetLang('DisabledAutoresponder_Item');
						foreach ($disabled_list as $p => $details) {
							$disabled_report .= sprintf($var, $details['autorespondername'], $details['listname']) . "\n";
						}
					break;

					case 'newsletter':
						$GLOBALS['Heading'] = GetLang('Newsletters_Disabled_Heading');
						$GLOBALS['Intro'] = GetLang('Newsletters_Disabled_Heading_Intro');

						$disabled_list = IEM::sessionGet('NewslettersDisabled');

						$disabled_report = '';
						$var = GetLang('DisabledNewsletter_Item');
						foreach ($disabled_list as $p => $details) {
							$disabled_report .= sprintf($var, $details['newslettername']) . "\n";
						}
					break;
				}
				$GLOBALS['DisabledList'] = $disabled_report;
				$this->ParseTemplate('Settings_Disabled_Report');
				$this->PrintFooter(true);
			break;

			case 'systeminfo':
				$this->PrintHeader();
				$db = IEM::getDatabase();
				$GLOBALS['DatabaseVersion'] = $db->FetchOne('SELECT version() AS version');

				$GLOBALS['ProductVersion'] = GetLang('SENDSTUDIO_VERSION');
				$GLOBALS['ShowProd'] = empty($GLOBALS['ProductEdition']) ? 'none' : '';
				$charset = (isset($SENDSTUDIO_DEFAULTCHARSET)) ? $SENDSTUDIO_DEFAULTCHARSET : SENDSTUDIO_CHARSET;
				$GLOBALS['DefaultCharset'] = $charset;
				$GLOBALS['CharsetDescription'] = GetLang($charset);
				$GLOBALS['ServerTimeZone'] = SENDSTUDIO_SERVERTIMEZONE;
				$GLOBALS['ServerTimeZoneDescription'] = GetLang(SENDSTUDIO_SERVERTIMEZONE);
				$GLOBALS['ServerTime'] = date('r');
				$GLOBALS['PHPVersion'] = phpversion();
				$GLOBALS['ServerSoftware'] = htmlspecialchars($_SERVER["SERVER_SOFTWARE"], ENT_QUOTES, SENDSTUDIO_CHARSET);

				$GLOBALS['SafeModeEnabled'] = (SENDSTUDIO_SAFE_MODE) ? GetLang('Yes') : GetLang('No');

				$GLOBALS['ImapSupportFound'] = (function_exists('imap_open')) ? GetLang('Yes') : GetLang('No');

				$GLOBALS['CurlSupportFound'] = (function_exists('curl_init')) ? GetLang('Yes') : GetLang('No');

				$php_mods = $this->ParsePHPModules();

				$GLOBALS['GDVersion'] = GetLang('GD_NotDetected');
				if (Settings_API::GDEnabled() && $php_mods !== false) {
					$GLOBALS['GDVersion'] = $php_mods['gd']['GD Version'];
				}

				$GLOBALS['ModSecurity'] = GetLang('ModSecurity_Unknown');

				if (!is_numeric(strpos(php_sapi_name(), 'cgi')) && $php_mods !== false) {
					$apache_mods = $this->ParseApacheModules($php_mods);
					if (in_array('mod_security', $apache_mods)) {
						$GLOBALS['ModSecurity'] = GetLang('Yes');
开发者ID:hungnv0789,项目名称:vhtm,代码行数:67,代码来源:settings.php

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


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