Ejemplo n.º 1
0
function isPassword($con, $password)
{
    return getSingleVal($con, "appmanager_info", "info_name", "Password", "info_val") == $password;
}
Ejemplo n.º 2
0
		$sql_con = getSqlCon();
		//网站信息
		$WebTitle = getSingleVal($sql_con,'appmanager_info','info_name','WebTitle','info_val');
		$LinkTitle = getSingleVal($sql_con,'appmanager_info','info_name','LinkTitle','info_val');
		$LinkName1 = getSingleVal($sql_con,'appmanager_info','info_name','LinkName1','info_val');
		$LinkName2 = getSingleVal($sql_con,'appmanager_info','info_name','LinkName2','info_val');
		$LinkName3 = getSingleVal($sql_con,'appmanager_info','info_name','LinkName3','info_val');
		$Link1 = getSingleVal($sql_con,'appmanager_info','info_name','Link1','info_val');
		$Link2 = getSingleVal($sql_con,'appmanager_info','info_name','Link2','info_val');
		$Link3 = getSingleVal($sql_con,'appmanager_info','info_name','Link3','info_val');
		$AboutTitle = getSingleVal($sql_con,'appmanager_info','info_name','AboutTitle','info_val');
		$About1 = getSingleVal($sql_con,'appmanager_info','info_name','About1','info_val');
		$About2 = getSingleVal($sql_con,'appmanager_info','info_name','About2','info_val');
		$Copyright = getSingleVal($sql_con,'appmanager_info','info_name','Copyright','info_val');
		$FootLink = getSingleVal($sql_con,'appmanager_info','info_name','FootLink','info_val');
		$FootName = getSingleVal($sql_con,'appmanager_info','info_name','FootName','info_val');
	?>
	<body>
		<!-- 导航栏 -->
		<nav class="cyan">
		<div class="nav-wrapper container">
		 
				 <a href="#" class="brand-logo"><? echo $WebTitle; ?></a>
						<ul class="right hide-on-med-and-down">
							<li><a href="<? echo $FootLink; ?>"><? echo $FootName; ?></a></li>
					</ul>
			 </div>
			</nav>
		
		<!-- 内容 -->
		
Ejemplo n.º 3
0
	$langv=$_POST["langv"];
	$code=$_POST["code"];
	$password=$_POST['password'];
	$delete=$_POST['delete'];
	$length = strlen($code);
	
	$table_change = array('"'=>'&double_quoteee','\''=>'&single_quoteee');
	$code = strtr($code,$table_change);
	//die($code);
	if ($length<=30) die("<h1>代码过短!需要大于30B</h1>");	
	
	
	if ($id<=0){
		$sql_con = getSqlCon();
		$sql = "INSERT INTO `codepaste`(`title`, `code`, `language`, `author`, `password`, `length`) VALUES (\"$title\",\"$code\",\"$langv\",\"$author\",\"$password\",$length)";
		runSql($sql);
		header("Location: List.php"); 
	}else{
		$sql_con = getSqlCon();
		if (getSingleVal('codepaste','id',$id,'password')!=$password && $password!='CodePaste_Root') die ("<h1>Access Denied!(Wrong Password)</h1>");
		if ($delete != "Delete"){
			$sql = 'UPDATE `codepaste` SET `title`="'.$title.'",`code`="'.$code.'",`language`="'.$langv.'",`author`="'.$author.'",`length`='.$length.' WHERE `id` = '.$id;
			runSql($sql);
			header("Location: Code.php?ID=".$id); 
		}else{
			$sql = "DELETE FROM `codepaste` WHERE `id` = $id";
			runSql($sql);
			header("Location: index.php"); 
		}
	}
?>