function get_get_param($name, $default = '') { if (!isset($_GET[$name]) || !$_GET[$name]) { return $default; } $value = unicode_urldecode($_GET[$name]); if (get_magic_quotes_gpc()) { $value = stripslashes($value); } return $value; }
/** * save forum information * @param $cat_id category id * @param $forum_id forum id * @param $title forum title * @param $desc forum description * @param $type forum type (public|private) * @param return xml (<ret>0</ret>|<ret>1</ret>) */ function editFormSubmit($cat_id, $forum_id, $title, $desc, $type, $order) { if (!$this->_admin || 0 != strcasecmp($_SERVER['REQUEST_METHOD'], 'POST')) { return '<ret>0</ret>'; } $title = unicode_urldecode($title); $desc = unicode_urldecode($desc); prepare_to_db($title, 0); prepare_to_db($desc, 0); prepare_to_db($type, 0); $db = new DbAdmin(); if ($forum_id > 0) { return $db->editForum((int) $forum_id, $title, $desc, $type, (int) $order) ? '<ret>1</ret>' : '<ret>0</ret>'; } else { global $f; $forum_uri = $f->uriGenerate($title, TF_FORUM, 'forum_uri'); return $db->insertForum((int) $cat_id, $title, $desc, $type, $forum_uri, (int) $order) ? '<ret>1</ret>' : '<ret>0</ret>'; } }
/** * save forum information * @param $cat_id category id * @param $forum_id forum id * @param $title forum title * @param $desc forum description * @param $type forum type (public|private) * @param return xml (<ret>0</ret>|<ret>1</ret>) */ function editFormSubmit($cat_id, $forum_id, $title, $desc, $type) { if (!$this->_admin) { return '<ret>0</ret>'; } $title = unicode_urldecode($title); $desc = unicode_urldecode($desc); prepare_to_db($title, 0); prepare_to_db($desc, 0); $db = new DbAdmin(); if ($forum_id > 0) { return $db->editForum((int) $forum_id, $title, $desc, $type) ? '<ret>1</ret>' : '<ret>0</ret>'; } else { global $f; $forum_uri = $f->uriGenerate($title, TF_FORUM, 'forum_uri'); return $db->insertForum((int) $cat_id, $title, $desc, $type, $forum_uri) ? '<ret>1</ret>' : '<ret>0</ret>'; } }
function getgetparam($name, $default = '') { global $webim_encoding; if (!isset($_GET[$name]) || !$_GET[$name]) { return $default; } $value = myiconv("utf-8", $webim_encoding, unicode_urldecode($_GET[$name])); if (get_magic_quotes_gpc()) { $value = stripslashes($value); } return $value; }
require_once "../../action/mysql.class.php"; header('Content-Type: text/html; charset=GBK'); session_start(); if (isset($_POST[task]) && "addProdOrder" == $_POST[task]) { if ($_POST[m_code] == $_SESSION[validationcode]) { require_once "../../action/mysql.class.php"; $sql = "insert into prod_order(cust_name,link_name,phone,address,fax,content,create_date,prod_count,prod_code,prod_id,prod_name) " . " values('{$_POST['company']}','{$_POST['linkman']}','{$_POST['tel']}','{$_POST['addr']}','{$_POST['fax']}','{$_POST['bz']}',now(),'{$_POST['num']}','{$_POST['procode']}','{$_POST['id']}','{$_POST['proname']}')"; $db->query($sql); echo "<script>alert('产品订购成功,我们会尽快与您联系!');location.href='../prodinfo.php?id={$_POST['id']}';</script>"; } else { echo "<script>alert('验证码错误,请重试!');location.href='../prodorder.php?id={$_POST['id']}'</script>"; } } else { if (isset($_POST[act]) && "checkProdByName" == $_POST[act]) { $str = iconv('utf-8', 'gbk', unicode_urldecode($_POST[prodName])); $query = $db->query("select * from prod where prod_name='{$str}'"); $row = $db->fetch_array($query); $cnt = $db->db_num_rows(); if ($cnt > 0) { echo $row[prod_code]; } else { echo "ERROR"; } } else { if (isset($_POST[act]) && "checkProdByCode" == $_POST[act]) { $query = $db->query("select * from prod where prod_code='{$_POST['prodCode']}'"); $row = $db->fetch_array($query); $cnt = $db->db_num_rows(); if ($cnt > 0) { echo $row[prod_name];
// wiki is not open for this group, // we include break; also in this block // because we want to fall to default option if ($allow_wiki) { if (!$open_wiki && !$access_isGroupMember) { warnPrivatePage("wiki"); break; } else { include_once 'includes/Page.Wiki.class.php'; $wikipage = new WikiPage($group_name); $pg->setLayout($pg->WithSidebar); if (!isset($_GET['obj1'])) { $first_id = $wikipage->getDefaultPageID(); } else { // from GeneralFunctions.php $first_id = unicode_urldecode($_GET['obj1']); } $first_content = wikiGetDefaultContent($first_id); $pg->addBlock($pg->Sidebar, $treng->_('Wiki Index', "modulewiki"), $wikipage->getLinks($first_id), $treng->_("List of Wiki Pages; you can browse the wiki in here", "modulewiki")); $pg->addBlock($pg->MainColumn, $wikipage->getTitle($first_id), $first_content, $treng->_("A Wiki Page; rich content created and edited by grou.p members", "modulewiki"), false, false, false, true, "", $service_host . $group_name . "/wiki/" . $first_id); // START // We show Operations block to everyone // even we consider its probability of // being empty. // Because always, there may be // Revisions option // // if($access_isGroupMember) { // operations format $ops_area_html = $wikipage->getOperations($access_isGroupMember, $access_isGroupAdmin, $first_id); $is_editable = $group->canMembersEditWiki();