Exemplo n.º 1
0
	/**
	* ShowStep_3
	* This prints the "upgrade successful, all ok" message.
	* It also calls the server-stats file to notify us of the upgrade and the server info, if the user chose to send it to us.
	*
	* @return Void Prints the page out, doesn't return it.
	*/
	function ShowStep_3()
	{
		// if there are upgrades, we can't show the finished page yet
		if (IEM::hasUpgrade()) {
	        header('Location: index.php');
	        
	        exit;
		}
		
		$this->PrintHeader();
		?>
		<br /><br /><br /><br />
		<table style="margin:auto;"><tr><td style="border:solid 2px #DDD; padding:20px; background-color:#FFF; width:450px">
		<table>
			<tr>
				<td class="Heading1">
					<img src="images/logo.jpg" />
				</td>
			</tr>
			<tr>
				<td style="padding:10px 0px 5px 0px">
					<strong><?php echo sprintf(GetLang('UpgradeFinished'), GetLang('SENDSTUDIO_VERSION')); ?></strong>
					<p><a href="index.php"><?php echo GetLang('UpgradeFinished_ClickToContinue'); ?></a></p>
				</td>
			</tr>
		</table>
		</td></tr></table>
		<?php
		if (IEM::sessionGet('SendServerDetails')) {
			require_once(IEM_PATH . '/ext/server_stats/server_stats.php');
			$previous_version = IEM::sessionGet('PreviousVersion');
			$server_stats_info = serverStats_Send('upgrade', $previous_version, GetLang('SENDSTUDIO_VERSION'), 'SS');
			if ($server_stats_info['InfoSent'] === false) {
				echo $server_stats_info['InfoImage'];
			}
		}
		$this->PrintFooter();

		if (is_file(IEM_STORAGE_PATH . '/.version')) {
			@unlink(IEM_STORAGE_PATH . '/.version');
		}
	}
Exemplo n.º 2
0
 // If the user have not logged in yet, we need to check for "IEM_CookieLogin"
 // and "IEM_LoginPreference" cookie. This cookie is used in "remember me" feature.
 //
 // TODO refactor this to IEM::login() function
 // --------------------------------------------------------------------------------
 if (!IEM::getCurrentUser()) {
     $tempValid = false;
     $tempCookie = false;
     $tempUser = false;
     // This is not a loop, rather a way to "return early" to avoid nested if
     // * Comment from a later developer: If you have to do this, there is
     // * probably a better way to code it. Programming doesn't necessarily
     // * mean "hacking".
     while (true) {
         // if we are installing or upgrading then we need to bypass this
         if (!IEM::isInstalled() && IEM::isInstalling() || IEM::hasUpgrade() && IEM::isUpgrading() || IEM::isCompletingUpgrade()) {
             $tempValid = true;
             break;
         }
         // Get cookie
         $tempCookie = IEM::requestGetCookie('IEM_CookieLogin', array());
         if (empty($tempCookie)) {
             break;
         }
         // Check if cookie contains user information
         if (!is_array($tempCookie) || !isset($tempCookie['user'])) {
             break;
         }
         // Get user
         $tempUser = new User_API();
         $tempUser->Load(intval($tempCookie['user']));