Esempio n. 1
0
             if ($_G['setting']['enablemap'] == 1) {
                 array_push($shopmenu, array('menu_shop_map', 'map&m=shop&itemid=' . $_GET['itemid']));
             }
             showsubmenu('shop_edit', $shopmenu);
         }
         break;
 }
 showtips($mname . '_' . $_GET['action'] . '_tips');
 showformheader('edit&m=' . $mname, 'enctype');
 showtableheader();
 if ($_GET['action'] == 'add' && $mname == 'shop') {
     showusernamefield();
     //註冊顯示
 }
 if ($mname == 'shop') {
     $grouplist = getgrouplist();
     showsetting('shop_groupid', array('groupid', $grouplist), $editvalue['groupid'], 'select', '', '', '', '', '<span style="color:red">*</span>');
 }
 showbasicfield($mname, $editvalue, $_SSCONFIG, $categorylist);
 //顯示基本字段
 //讀取自定義字段
 foreach ($cacheinfo['columns'] as $value) {
     if ($mname == "groupbuy" && preg_match('/^user_|^ext_/', $value['fieldname'])) {
         continue;
     }
     if ($mname == "good" && $value['fieldname'] == "intro") {
         continue;
     }
     $temparr = $temparr2 = array();
     $other = $required = $value['required'] = '';
     if ($value['formtype'] == 'select') {
Esempio n. 2
0
             $connect->Execute("DELETE FROM {$dbprefix}questions WHERE qid={$row['qid']} or parent_qid={$row['qid']}");
             // Checked
             $connect->Execute("DELETE FROM {$dbprefix}defaultvalues WHERE qid={$row['qid']}");
             // Checked
             $connect->Execute("DELETE FROM {$dbprefix}quota_members WHERE qid={$qid}");
         }
     }
     $query = "DELETE FROM " . db_table_name('assessments') . " WHERE sid={$surveyid} AND gid={$gid}";
     $result = $connect->Execute($query) or safe_die($connect->ErrorMsg());
     // Checked
     $query = "DELETE FROM " . db_table_name('groups') . " WHERE sid={$surveyid} AND gid={$gid}";
     $result = $connect->Execute($query) or safe_die($connect->ErrorMsg());
     // Checked
     if ($result) {
         $gid = "";
         $groupselect = getgrouplist($gid);
         fixSortOrderGroups($surveyid);
         $_SESSION['flashmessage'] = $clang->gT("The question group was deleted.");
     } else {
         $databaseoutput .= "<script type=\"text/javascript\">\n<!--\n alert(\"" . $clang->gT("Group could not be deleted", "js") . "\n{$error}\")\n //-->\n</script>\n";
     }
     LimeExpressionManager::UpgradeConditionsToRelevance($surveyid);
 } elseif ($action == "insertquestion" && bHasSurveyPermission($surveyid, 'surveycontent', 'create')) {
     $baselang = GetBaseLanguageFromSurveyID($postsid);
     if (strlen($_POST['title']) < 1) {
         $databaseoutput .= "<script type=\"text/javascript\">\n<!--\n " . "alert(\"" . $clang->gT("The question could not be added. You must enter at least enter a question code.", "js") . "\")\n " . "//-->\n</script>\n";
     } else {
         if (!isset($_POST['lid']) || $_POST['lid'] == '') {
             $_POST['lid'] = "0";
         }
         if (!isset($_POST['lid1']) || $_POST['lid1'] == '') {