Example #1
0
    </style>
	<link rel="stylesheet" href="./Bootstrap/css/code-style.css" type="text/css" />
  </head>
  <body>
  <div class="container">
		<? 
			include("header.php");
			include("mysql.php");
		?>
		
		<?
			$sql_con = getSqlCon();
			$id=$_GET['ID'];
			$row = null;
			if ($id>0) {
				$result = getRowWithInt('codepaste','id',$id);
				if (mysql_num_rows($result)<=0) die("<h1>没有找到需要编辑的代码!</h1>");
				$row=mysql_fetch_array($result);
				$recov_change = array('&double_quoteee'=>'"','&single_quoteee'=>'\'');
				$code = strtr($row['code'],$recov_change);
			}
		?>
		<div class="page-header">
			<h1>Paste<small id="sml"> <cn>上传您的代码/文本</cn></small></h1>
		</div>
		<form id="mainForm" method="post" action="Post.php">
		
		<p><div class="input-group  inputbox">
			<span class="input-group-addon">ID</span>
			<input id="id" class="form-control" name="id" placeholder="ID发布后分配" maxlength="20" <? if ($id>0) echo 'value='.$row['id']; ?> readonly>
		</div>
Example #2
0
			<form class="col s12"  method="post">
				<div class="row">
				<?
					if($_SERVER['REQUEST_METHOD'] != 'POST'){
						if ($_COOKIE["isLogin"]!=true) die("<h1>Access Denied!</h1>");
						setcookie("isLogin", true, time()+3600);
						$sql_con = getSqlCon();
						if ($_GET['ID']==null){
							outputS12ReadInputBox("ID","","新建产品信息(无须填写)");
							outputDisSwitch();
							outputS12InputBox("Title","","产品名称");
							outputS12TextArea("Intro","","产品介绍");
							outputS12InputBox("Link","","产品链接");
							outputS12InputBox("Image","","产品图片");
						}else{
							$result = getRowWithInt($sql_con,"appmanager_content",'id',$_GET['ID']);
							$row = mysql_fetch_array($result);
							outputS12ReadInputBox("ID",$_GET['ID'],"修改产品ID(无须修改)");
							outputSwitch();
							outputS12InputBox("Title",$row['title'],"产品名称");
							outputS12TextArea("Intro",$row['intro'],"产品介绍");
							outputS12InputBox("Link",$row['link'],"产品链接");
							outputS12InputBox("Image",$row['image'],"产品图片");
						}
					}
					if($_SERVER['REQUEST_METHOD'] == 'POST'){
						$sql_con = getSqlCon();
						if ($_COOKIE["isLogin"]!=true) if ($_POST["Password"]==null ||!isPassword($sql_con,$_POST["Password"])) die("<h1>Access Denied : Worng Password!</h1>");
						if ($_POST['ID']==null){
							newRow();
						}else{