예제 #1
0
$failRedirect = "?p=accounts";
$redirect = "?p=accounts";
$userId = $_SESSION['idUser'];

//---------------------------------------------------------------------------------------------
//
//    preparing and performing query
//
$result = ARRAY();
$spUpdatePassword = DBSP_PUpdatePassword;
$spUpdateEmail = DBSP_PUpdateEmail;
$spUpdateAvatar = DBSP_PUpdateAvatar;
$spUpdateGravatar = DBSP_PUpdateGravatar;

$db = new CDatabaseController();
$mysqli = $db->connectToDatabase();



//---------------------------------------------------------------------------------------------
//
//    changing password
//

if($submit == "changepwd") {

$password = isset($_POST['userPwd']) ? $_POST['userPwd'] : '';
$passwordConfirm = isset($_POST['confPwd']) ? $_POST['confPwd'] : '';

$pc->CheckPassword($password, $passwordConfirm, $failRedirect);
예제 #2
0
	public function CreateLinksToArticles() {
	
		$spShowTopics = DBSP_PShowTopics;
		$db = new CDatabaseController();

	$topicsList = <<< EOD

		<h3>Senaste artiklar</h3>
			<hr class='artNav' />

EOD;
		
		$query = "call {$spShowTopics}();";
		$mysqli = $db->connectToDatabase();
		$res = $db->performDirectQuery($query);
		
		
		
		//------------------------------ retrieving and performing query

		
		while($row = $res->fetch_object()) {
			
			$articleId = $row->idTopic;
			$articleTitle = $row->title;
			
			
			
			
			$topicsList .= <<< EOD
				<a href='?m=tuna&amp;p=showtopic&amp;articleId={$articleId}' class='articleNav'>{$articleTitle}</a>
				<br />
EOD;
			
		}
		
		return $topicsList;
	}