rtoss

Subversion Repositories:
Compare Path: Rev
With Path: Rev
/Web Favorities @ 352  →  /Web Favorities @ 353
/Web Favorities/fav_reorder_2.php
@@ -25,7 +25,7 @@
// array_pop($order);
foreach($order as $ord => $id)
$Command1_CommandText.="UPDATE Fav SET ord = ".intval($ord)." WHERE id = ".intval($id).";";
$db->exec($Command1_CommandText,$conn);
$db->exec($Command1_CommandText);
 
header("Location: ".$MM_RedirectUrl);
exit();
/Web Favorities/fav_add.php
@@ -15,7 +15,7 @@
if (isset($_SESSION['isLogined']) && isset($_POST["MM_insert"]) && $_POST["MM_insert"]=="form1"){
$qry="SELECT COUNT(id) FROM Fav";
$rs=$db->query($qry);
$rcnt=$db->fetchColumn($rs);
$rcnt=$rs->fetchColumn();
$sth = $db->prepare('INSERT INTO Fav (cat,name,addr,catid,protected,ord) VALUES (?, ?, ?, ?, ?, ?)');
$sth->execute(array($Command1__varcat, $Command1__varname, $Command1__varaddr, $Command1__varcatid, $Command1__varprot, $rcnt));
// $Command1_CommandText="INSERT INTO Fav (cat,name,addr,catid,protected,ord) VALUES (".sqlite_escape_string($Command1__varcat).",'".sqlite_escape_string($Command1__varname)."','".sqlite_escape_string($Command1__varaddr)."',".sqlite_escape_string($Command1__varcatid).",".sqlite_escape_string($Command1__varprot).",".sqlite_escape_string($rcnt).")";
/Web Favorities/fav_reorder.php
@@ -24,7 +24,7 @@
array_pop($order);
foreach($order as $ord => $id)
$Command1_CommandText.="UPDATE Fav SET ord = ".intval($ord)." WHERE id = ".intval($id).";";
$db->exec($Command1_CommandText,$conn);
$db->exec($Command1_CommandText);
 
header("Location: ".$MM_RedirectUrl);
exit();
/Web Favorities/fav_del.php
@@ -18,7 +18,7 @@
 
if (isset($_SESSION['isLogined']) && isset($_POST["MM_delete"]) && $_POST["MM_delete"]=="form1"){
$Command1_CommandText="DELETE FROM Fav WHERE id = ".$Command1__varid;
$db->qexec($Command1_CommandText);
$db->exec($Command1_CommandText);
header("Location: ".$MM_RedirectUrl);
exit();
} elseif (isset($_POST["MM_delete"]) && $_POST["MM_delete"]!=""){
/Web Favorities/fav_action.php
@@ -26,14 +26,14 @@
if (!isset($_SESSION['isLogined']) && !viewAuth()) {
if (($iAction=="go") && ($iPass) && isset($_POST["h_id"]) && (($iPass==$FavPasswd) || ($iPass==$ViewPassword))) {
viewAuth('login',$iPass);
$qry="SELECT * FROM Fav WHERE id = ".$_POST["h_id"];
$qry="SELECT * FROM Fav WHERE id = ".intval($_POST["h_id"]);
$rs=$db->query($qry);
$row = $rs->fetch(PDO::FETCH_ASSOC);
header("Location: ".$row["addr"]);
} else {
if (($iAction=="go") && (!$iPass)) {
echo $MyFav_PasswdPrompt.'<form action="'.$_SERVER['PHP_SELF'].'?action=go" method="post">
<input type="hidden" name="h_id" value="'.$_GET["id"].'">
<input type="hidden" name="h_id" value="'.intval($_GET["id"]).'">
<input type="password" name="pwd">
<input type="submit" name="Submit" value="登入">
'.$MyFav_BackHTML.'