Exemple #1
0
function user()
{
    global $context;
    if ($context['user']['is_logged']) {
        echo '<div class="user">';
        echo '<table border=0 cellpadding=5><tr>';
        if (!empty($context['user']['avatar'])) {
            echo '<td valign="top"><p class="avatar">', $context['user']['avatar']['image'], '</p></td>';
        }
        echo '<td valign="top"><b>Hello <span>', $context['user']['name'], '</span></b><br />';
        ssi_logout();
        echo '</td>';
        echo '</tr>';
        echo '</table><br />';
        echo '</div>';
    } else {
        ssi_login();
    }
}
Exemple #2
0
				<b>Total posts:</b> <?php 
    echo $posts;
    ?>
<br />
			</center>
		</p>
		
		<p>
			Welcome, <?php 
    echo $name;
    ?>
 (<?php 
    ssi_logout('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
    ?>
)<br />
			<b>Inbox:</b> <?php 
    echo $messages;
    ?>
<br />
			<b>Unread:</b> <?php 
    echo $unread_messages;
    ?>
<br />
		</p>
		
	</div>
	
<?php 
} else {
    ssi_login('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
}
Exemple #3
0
											</a>
											<a href="#">
											<div class="col-xs-5" style="color:#353b56;padding:8px 2px 0 0;height:40px;background:#b6cee4;border-bottom-right-radius:10px;">
												Messages
											</div>
											</a>
										</div>
										<?php 
    }
}
?>
						</div>
						<div class="col-xs-6" style="margin-top:30px;background:#b6cee4;height:85px;text-align:center;padding-top:8px;border-radius:10px;">
							<?php 
if ($context['user']['is_guest']) {
    ssi_login();
} else {
    //You can show other stuff here.  Like ssi_welcome().  That will show a welcome message like.
    //Hey, username, you have 552 messages, 0 are new.
    echo "Logged in as:";
    echo '<hr style="height:2px;border-width:0;width:100%;color:#99b6d1;background-color:#99b6d1;margin: 5px;">';
    echo $context['user']['name'] . "<br>";
    ssi_logout();
}
?>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>	
function navbarleft()
{
    echo "   <div class = \"navleft\">\n";
    echo "         <div class = \"box\">\n";
    if ($context['user']['is_guest']) {
        ssi_login();
    } else {
        ssi_welcome();
        echo "<br><br>\n";
        ssi_logout();
    }
    //   echo "            <form method = \"post\" action = \"contact.php\">\n";
    //   echo "            Login Here:\n";
    //   echo "            <input type = \"text\" name = \"input\" value = \"Username\" onFocus = \"clearField(this)\" onBlur = \"fillField(this, 'Username')\" size = \"13\"><br>\n";
    //   echo "            <input type = \"text\" name = \"input\" value = \"Password\" onFocus = \"clearField(this)\" onBlur = \"fillField(this, 'Password')\" size = \"13\"><br>\n";
    //   echo "            <br>\n";
    //   echo "            <input type = \"submit\" value = \"Go\">\n";
    //   echo "            </form>\n";
    echo "         </div>\n";
    echo "         <div class = \"box\">\n";
    echo "            <form method = \"post\" action = \"contact.php\">\n";
    echo "            <input type = \"text\" name = \"input\" value = \"Google S.S.\" onFocus = \"clearField(this)\" onBlur = \"fillField(this, 'Google S.S.')\" size = \"13\">\n";
    echo "            <br><br>\n";
    echo "            <input type = \"submit\" value = \"Go\">\n";
    echo "            </form>\n";
    echo "         </div>\n";
    echo "         <div class = \"box\">\n";
    echo "            Stuff<br><br>\n";
    echo "            <ul class = \"navbutton\"><li><a href = \"http://www.turkiball.com/feed/archive.php\">Archive</a></ul><br><br>\n";
    echo "            <ul class = \"navbutton\"><li><a href = \"http://www.turkiball.com/feed/pictures\">Pictures</a></ul><br><br>\n";
    echo "            <ul class = \"navbutton\"><li><a href = \"http://www.turkiball.com/feed/rules\">Rulebook</a></ul><br><br>\n";
    echo "            <ul class = \"navbutton\"><li><a href = \"http://www.turkiball.com/feed/about\">About</a></ul><br><br>\n";
    echo "            <ul class = \"navbutton\"><li><a href = \"http://www.turkiball.com/feed/people\">People</a></ul><br><br>\n";
    echo "            <br><br>\n";
    echo "         </div>\n";
    echo "         <div class = \"box\">\n";
    echo "            Categories<br><br>\n";
    echo "            <ul class = \"navbutton\"><li><a href = \"http://www.turkiball.com/feed/events\">Events</a></ul><br><br>\n";
    echo "            <ul class = \"navbutton\"><li><a href = \"http://www.turkiball.com/feed/league\">League News</a></ul><br><br>\n";
    echo "            <ul class = \"navbutton\"><li><a href = \"http://www.turkiball.com/feed/turkiball\">Turkiball News</a></ul><br><br>\n";
    echo "            <ul class = \"navbutton\"><li><a href = \"http://www.turkiball.com/feed/other\">Other News</a></ul><br><br>\n";
    echo "            <br><br>\n";
    echo "         </div>\n";
    echo "      </div>\n";
}
* Version Virgo 2.0 Beta 2    *
* Date 08.09.2015             *
*******************************/
global $db_prefix, $user_info, $boardurl, $boarddir, $sourcedir, $txt, $dbinstall_string;
// Load the SSI.php
if (file_exists(dirname(__FILE__) . '/SSI.php') && !defined('SMF')) {
    function _dbinst_write($string)
    {
        echo $string;
    }
    require_once dirname(__FILE__) . '/SSI.php';
    // on manual installation you have to logged in
    if (!$user_info['is_admin']) {
        if ($user_info['is_guest']) {
            echo '<b>', $txt['admin_login'], ':</b><br />';
            ssi_login($boardurl . '/dbinstall.php');
            die;
        } else {
            loadLanguage('Errors');
            fatal_error($txt['cannot_admin_forum']);
        }
    }
} elseif (!defined('SMF')) {
    die('<b>Error:</b> SSI.php not found. Please verify you put this in the same place as SMF\'s index.php.');
} else {
    function _dbinst_write($string)
    {
        global $dbinstall_string;
        $dbinstall_string .= $string;
    }
}
Exemple #6
0
    echo '<link REL="STYLESHEET" TYPE="text/css" HREF="../../../templates/' . $_GET['rosterTemplate'] . '/style.css"><center>';
    echo '<center><a href=# onClick="self.parent.location.reload(true)">Logged in. Click here to proceed.</a></center>';
    echo '
<script language="JavaScript">
<!--
self.parent.location.reload(true);
-->
</script>';
} else {
    //Only get the required information for the login form, we dont need it anywhere else.
    //Get credentials from Roster
    require '../../../conf.php';
    //Connect to the database.
    $dbh = mysql_connect($db_config['host'], $db_config['username'], $db_config['password']) or die('I cannot connect to the database because: ' . mysql_error());
    mysql_select_db($db_config['database']);
    //Lets grab the forum path.
    $query = "SELECT `config_name`, `config_value` FROM `{$db_config['table_prefix']}addon` a, `{$db_config['table_prefix']}addon_config` c WHERE a.addon_id = c.addon_id AND a.basename = 'smfsync' AND c.config_name = 'forum_path' ";
    $sqlqueryresult = mysql_query($query);
    $sqlqueryarray = mysql_fetch_array($sqlqueryresult);
    $forumPath = $sqlqueryarray['config_value'];
    //And we need the theme name, for css.
    $query = "SELECT `config_value` FROM `{$db_config['table_prefix']}config` WHERE `config_name` = 'theme' LIMIT 1";
    $sqlqueryresult = mysql_query($query);
    $sqlqueryarray = mysql_fetch_array($sqlqueryresult);
    $rosterTemplate = $sqlqueryarray['config_value'];
    require "../../../../{$forumPath}SSI.php";
    echo '<link REL="STYLESHEET" TYPE="text/css" HREF="../../../templates/' . $rosterTemplate . '/style.css"><center>';
    echo "<style>\nlabel{\n\tcolor: #CBA300;\n}\ninput{\n\tcolor: #CBA300;\n}\n</style>";
    $redirect = "http://{$_SERVER['SERVER_NAME']}{$_SERVER['SCRIPT_NAME']}?login=true&rosterTemplate={$rosterTemplate}";
    ssi_login($redirect);
}
Exemple #7
0
 function getLoginForm_Old2($level = 3)
 {
     echo border('sred', 'start', $this->translateLevel($level) . ' login required.');
     echo ssi_login('http://localhost/roster20/');
     echo border('sred', 'end');
 }
function navbarleft()
{
    echo "   <div class = \"navleft\">\n";
    echo "         <div class = \"box\">\n";
    if ($context['user']['is_guest']) {
        ssi_login();
    } else {
        ssi_welcome();
        echo "<br><br>\n";
        ssi_logout();
    }
    //   echo "            <form method = \"post\" action = \"contact.php\">\n";
    //   echo "            Login Here:\n";
    //   echo "            <input type = \"text\" name = \"input\" value = \"Username\" onFocus = \"clearField(this)\" onBlur = \"fillField(this, 'Username')\" size = \"13\"><br>\n";
    //   echo "            <input type = \"text\" name = \"input\" value = \"Password\" onFocus = \"clearField(this)\" onBlur = \"fillField(this, 'Password')\" size = \"13\"><br>\n";
    //   echo "            <br>\n";
    //   echo "            <input type = \"submit\" value = \"Go\">\n";
    //   echo "            </form>\n";
    echo "         </div>\n";
    echo "         <div class = \"box\">\n";
    echo "            <form method = \"post\" action = \"contact.php\">\n";
    echo "            <input type = \"text\" name = \"input\" value = \"Google S.S.\" onFocus = \"clearField(this)\" onBlur = \"fillField(this, 'Google S.S.')\" size = \"13\">\n";
    echo "            <br><br>\n";
    echo "            <input type = \"submit\" value = \"Go\">\n";
    echo "            </form>\n";
    echo "         </div>\n";
    echo "         <div class = \"box\">\n";
    echo "            Stuff<br><br>\n";
    echo "            <ul class = \"navbutton\"><li><a href = \"http://www.guardiansportsalliance.com/archive.php\">Home</a></ul><br><br>\n";
    echo "            <ul class = \"navbutton\"><li><a href = \"http://www.guardiansportsalliance.com/about.php\">About</a></ul><br><br>\n";
    echo "            <ul class = \"navbutton\"><li><a href = \"http://www.guardiansportsalliance.com/organizations.php\">Organizations</a></ul><br><br>\n";
    echo "            <br><br>\n";
    echo "         </div>\n";
    echo "         <div class = \"box\">\n";
    echo "            Sports<br><br>\n";
    echo "            <ul class = \"navbutton\"><li><a href = \"http://www.guardiansportsalliance.com/football\">Football</a></ul><br><br>\n";
    echo "            <ul class = \"navbutton\"><li><a href = \"http://www.guardiansportsalliance.com/basketball\">Basketball</a></ul><br><br>\n";
    echo "            <ul class = \"navbutton\"><li><a href = \"http://www.guardiansportsalliance.com/turkiball\">Turkiball</a></ul><br><br>\n";
    echo "            <br><br>\n";
    echo "         </div>\n";
    echo "      </div>\n";
}
* Version Virgo 2.0 Beta 2    *
* Date 08.09.2015             *
*******************************/
global $sourcedir, $boarddir, $boardurl, $smcFunc, $user_info, $txt, $dbinstall_string;
// Load the SSI.php
if (file_exists(dirname(__FILE__) . '/SSI.php') && !defined('SMF')) {
    function _dbinst_write($string)
    {
        echo $string;
    }
    require_once dirname(__FILE__) . '/SSI.php';
    // on manual installation you have to logged in
    if (!$user_info['is_admin']) {
        if ($user_info['is_guest']) {
            echo '<b>', $txt['admin_login'], ':</b><br />';
            ssi_login($boardurl . '/removehook.php');
            die;
        } else {
            loadLanguage('Errors');
            fatal_error($txt['cannot_admin_forum']);
        }
    }
} elseif (!defined('SMF')) {
    die('<b>Error:</b> SSI.php not found. Please verify you put this in the same place as SMF\'s index.php.');
} else {
    function _dbinst_write($string)
    {
        global $dbinstall_string;
        $dbinstall_string .= $string;
    }
}
 /**
  * Short description
  *
  * Long description
  *
  * @param
  * @return
  */
 protected function show_loginBox()
 {
     try {
         $this->loadSSI();
     } catch (Exception $e) {
         throw new \Exception($e->getMessage());
     }
     if ('echo' == $this->output_method) {
         ob_start();
         ssi_login($this->redirect_to, $this->output_method);
         $this->data = ob_get_contents();
         ob_end_clean();
     } else {
         $this->data = ssi_login($this->redirect_to, $this->output_method);
     }
 }