onokazu
onoka****@users*****
2005年 8月 3日 (水) 21:40:01 JST
Index: xoops2jp/html/modules/xoopsfaq/admin/contentsform.php diff -u xoops2jp/html/modules/xoopsfaq/admin/contentsform.php:1.2 xoops2jp/html/modules/xoopsfaq/admin/contentsform.php:1.3 --- xoops2jp/html/modules/xoopsfaq/admin/contentsform.php:1.2 Fri Mar 18 21:52:49 2005 +++ xoops2jp/html/modules/xoopsfaq/admin/contentsform.php Wed Aug 3 21:40:01 2005 @@ -1,5 +1,5 @@ <?php -// $Id: contentsform.php,v 1.2 2005/03/18 12:52:49 onokazu Exp $ +// $Id: contentsform.php,v 1.3 2005/08/03 12:40:01 onokazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -41,7 +41,7 @@ xoopsCodeTarea("contents_contents", 60, 20); xoopsSmilies("contents_contents"); -$checked = " checked='checked'"; +$checked = ($contents_nohtml == 1) ? " checked='checked'" : ""; echo "<br /><input type='checkbox' name='contents_nohtml' value='1'$checked />"._XD_NOHTML."<br />"; $checked = ($contents_nosmiley == 1) ? " checked='checked'" : ""; Index: xoops2jp/html/modules/xoopsfaq/admin/index.php diff -u xoops2jp/html/modules/xoopsfaq/admin/index.php:1.3 xoops2jp/html/modules/xoopsfaq/admin/index.php:1.4 --- xoops2jp/html/modules/xoopsfaq/admin/index.php:1.3 Sat Jun 11 11:32:55 2005 +++ xoops2jp/html/modules/xoopsfaq/admin/index.php Wed Aug 3 21:40:01 2005 @@ -1,5 +1,5 @@ <?php -// $Id: index.php,v 1.3 2005/06/11 02:32:55 onokazu Exp $ +// $Id: index.php,v 1.4 2005/08/03 12:40:01 onokazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -196,11 +196,16 @@ if ($op == "addcontentsgo") { $category_id = !empty($_POST['category_id']) ? intval($_POST['category_id']) : 0; if ($category_id > 0) { + $contents_nohtml = !empty($_POST['contents_nohtml']) ? 1 : 0; + $contents_nosmiley = !empty($_POST['contents_nosmiley']) ? 1 : 0; + $contents_noxcode = !empty($_POST['contents_noxcode']) ? 1 : 0; + $contents_visible = !empty($_POST['contents_visible']) ? 1 : 0; + $contents_order = !empty($_POST['contents_order']) ? intval($_POST['contents_order']) : 0; $myts =& MyTextSanitizer::getInstance(); $title = $myts->stripSlashesGPC($_POST['contents_title']); $contents = $myts->makeTareaData4Save($_POST['contents_contents']); $newid = $xoopsDB->genId($xoopsDB->prefix("xoopsfaq_contents")."_contents_id_seq"); - $sql = "INSERT INTO ".$xoopsDB->prefix("xoopsfaq_contents")." (contents_id, category_id, contents_title, contents_contents, contents_time, contents_order, contents_visible, contents_nohtml, contents_nosmiley, contents_noxcode) VALUES ($newid, $category_id, ".$xoopsDB->quoteString($title).", ".$xoopsDB->quoteString($contents).", ".time().", ".intval($_POST['contents_order']).", ".intval($_POST['contents_visible']).", ".intval($_POST['contents_nohtml']).", ".intval($_POST['contents_nosmiley']).", ".intval($_POST['contents_noxcode']).")"; + $sql = "INSERT INTO ".$xoopsDB->prefix("xoopsfaq_contents")." (contents_id, category_id, contents_title, contents_contents, contents_time, contents_order, contents_visible, contents_nohtml, contents_nosmiley, contents_noxcode) VALUES ($newid, $category_id, ".$xoopsDB->quoteString($title).", ".$xoopsDB->quoteString($contents).", ".time().", ".$contents_order.", ".$contents_visible.", ".$contents_nohtml.", ".$contents_nosmiley.", ".$contents_noxcode.")"; if (!$xoopsDB->query($sql)) { xoops_cp_header(); echo "Could not add contents";