public function info_publish() { $memberinfo = $this->memberinfo; $grouplist = getcache('grouplist'); $SEO['title'] = L('info_publish', '', 'info'); //判断会员组是否允许投稿 if (!$grouplist[$memberinfo['groupid']]['allowpost']) { showmessage(L('member_group') . L('publish_deny'), HTTP_REFERER); } //判断每日投稿数 $this->content_check_db = pc_base::load_model('content_check_model'); $todaytime = strtotime(date('y-m-d', SYS_TIME)); $_username = $memberinfo['username']; $allowpostnum = $this->content_check_db->count("`inputtime` > {$todaytime} AND `username`='{$_username}'"); if ($grouplist[$memberinfo['groupid']]['allowpostnum'] > 0 && $allowpostnum >= $grouplist[$memberinfo['groupid']]['allowpostnum']) { showmessage(L('allowpostnum_deny') . $grouplist[$memberinfo['groupid']]['allowpostnum'], HTTP_REFERER); } $siteids = getcache('category_content', 'commons'); header("Cache-control: private"); if (isset($_POST['dosubmit'])) { $catid = intval($_POST['info']['catid']); $siteid = $siteids[$catid]; $CATEGORYS = getcache('category_content_' . $siteid, 'commons'); $category = $CATEGORYS[$catid]; $modelid = $category['modelid']; if (!$modelid) { showmessage(L('illegal_parameters'), HTTP_REFERER); } $this->content_db = pc_base::load_model('content_model'); $this->content_db->set_model($modelid); $table_name = $this->content_db->table_name; $fields_sys = $this->content_db->get_fields(); $this->content_db->table_name = $table_name . '_data'; $fields_attr = $this->content_db->get_fields(); $fields = array_merge($fields_sys, $fields_attr); $fields = array_keys($fields); $info = array(); foreach ($_POST['info'] as $_k => $_v) { if (in_array($_k, $fields)) { $info[$_k] = $_v; } } $post_fields = array_keys($_POST['info']); $post_fields = array_intersect_assoc($fields, $post_fields); $setting = string2array($category['setting']); if ($setting['presentpoint'] < 0 && $memberinfo['point'] < abs($setting['presentpoint'])) { showmessage(L('points_less_than', array('point' => $memberinfo['point'], 'need_point' => abs($setting['presentpoint']))), APP_PATH . 'index.php?m=pay&c=deposit&a=pay&exchange=point', 3000); } //判断会员组投稿是否需要审核 if ($grouplist[$memberinfo['groupid']]['allowpostverify'] || !$setting['workflowid']) { $info['status'] = 99; } else { $info['status'] = 1; } $info['username'] = $memberinfo['username']; $this->content_db->siteid = $siteid; $id = $this->content_db->add_content($info); //检查投稿奖励或扣除积分 $flag = $catid . '_' . $id; if ($setting['presentpoint'] > 0) { pc_base::load_app_class('receipts', 'pay', 0); receipts::point($setting['presentpoint'], $memberinfo['userid'], $memberinfo['username'], $flag, 'selfincome', L('contribute_add_point'), $memberinfo['username']); } else { pc_base::load_app_class('spend', 'pay', 0); spend::point($setting['presentpoint'], L('contribute_del_point'), $memberinfo['userid'], $memberinfo['username'], '', '', $flag); } //缓存结果 $model_cache = getcache('model', 'commons'); $infos = array(); foreach ($model_cache as $modelid => $model) { if ($model['siteid'] == $siteid) { $datas = array(); $this->content_db->set_model($modelid); $datas = $this->content_db->select(array('username' => $memberinfo['username'], 'sysadd' => 0), 'id,catid,title,url,username,sysadd,inputtime,status', 100, 'id DESC'); } } setcache('member_' . $memberinfo['userid'] . '_' . $siteid, $infos, 'content'); //缓存结果 END if ($info['status'] == 99) { showmessage(L('contributors_success'), APP_PATH . 'index.php?m=member&c=content&a=info_top&id=' . $id . '&catid=' . $catid . '&msg=1'); } else { showmessage(L('contributors_checked'), APP_PATH . 'index.php?m=member&c=content&a=info_top&id=' . $id . '&catid=' . $catid . '&msg=1'); } } else { $show_header = $show_dialog = $show_validator = ''; $step = $step_1 = $step_2 = $step_3 = $step_4; $temp_language = L('news', '', 'content'); $sitelist = getcache('sitelist', 'commons'); /* if(!isset($_GET['siteid']) && count($sitelist)>1) { include template('member', 'content_publish_select_model'); exit; } */ //设置cookie 在附件添加处调用 param::set_cookie('module', 'content'); $siteid = intval($_GET['siteid']); //获取信息模型类别、区域、城市信息 $info_linkageid = getinfocache('info_linkageid'); $cityid = getcity(trim($_GET['city']), 'linkageid'); $cityname = getcity(trim($_GET['city']), 'name'); $citypinyin = getcity(trim($_GET['city']), 'pinyin'); $zone = intval($_GET['zone']); $zone_name = get_linkage($zone, $info_linkageid, '', 0); if (!$siteid) { $siteid = 1; } $CATEGORYS = getcache('category_content_' . $siteid, 'commons'); $priv_db = pc_base::load_model('category_priv_model'); //加载栏目权限表数据模型 foreach ($CATEGORYS as $catid => $cat) { if ($cat['siteid'] == $siteid && $cat['child'] == 0 && $cat['type'] == 0 && $priv_db->get_one(array('catid' => $catid, 'roleid' => $memberinfo['groupid'], 'is_admin' => 0, 'action' => 'add'))) { break; } } $catid = $_GET['catid'] ? intval($_GET['catid']) : $catid; if (!$catid) { showmessage(L('category') . L('publish_deny'), APP_PATH . 'index.php?m=member'); } //判断本栏目是否允许投稿 if (!$priv_db->get_one(array('catid' => $catid, 'roleid' => $memberinfo['groupid'], 'is_admin' => 0, 'action' => 'add'))) { showmessage(L('category') . L('publish_deny'), APP_PATH . 'index.php?m=member'); } $category = $CATEGORYS[$catid]; if ($category['siteid'] != $siteid) { showmessage(L('site_no_category'), '?m=member&c=content&a=info_publish'); } $setting = string2array($category['setting']); if ($zone == 0 && !isset($_GET['catid'])) { $step = 1; include template('member', 'info_content_publish_select'); exit; } elseif ($zone == 0 && $category['child']) { $step = 2; $step_1 = '<a href="' . APP_PATH . 'index.php?m=member&c=content&a=info_publish&siteid=' . $siteid . '&city=' . $citypinyin . '">' . $category['catname'] . '</a>'; include template('member', 'info_content_publish_select'); exit; } elseif ($zone == 0 && isset($_GET['catid'])) { $step = 3; $step_1 = '<a href="' . APP_PATH . 'index.php?m=member&c=content&a=info_publish&siteid=' . $siteid . '">' . $CATEGORYS[$category['parentid']]['catname'] . '</a>'; $step_2 = '<a href="' . APP_PATH . 'index.php?m=member&c=content&a=info_publish&siteid=' . $siteid . '&city=' . $citypinyin . '&catid=' . $category['parentid'] . '">' . $category['catname'] . '</a>'; $zone_arrchild = show_linkage($info_linkageid, $cityid, $cityid); include template('member', 'info_content_publish_select'); exit; } elseif ($zone !== 0 && get_linkage_level($info_linkageid, $zone, 'child') && !$_GET['jumpstep']) { $step = 4; $step_1 = '<a href="' . APP_PATH . 'index.php?m=member&c=content&a=info_publish&siteid=' . $siteid . '&city=' . $citypinyin . '">' . $CATEGORYS[$category['parentid']]['catname'] . '</a>'; $step_2 = '<a href="' . APP_PATH . 'index.php?m=member&c=content&a=info_publish&siteid=' . $siteid . '&city=' . $citypinyin . '&catid=' . $category['parentid'] . '">' . $category['catname'] . '</a>'; $step_3 = '<a href="' . APP_PATH . 'index.php?m=member&c=content&a=info_publish&siteid=' . $siteid . '&city=' . $citypinyin . '&catid=' . $catid . '">' . $zone_name . '</a>'; $zone_arrchild = get_linkage_level($info_linkageid, $zone, 'arrchildinfo'); include template('member', 'info_content_publish_select'); exit; } if ($setting['presentpoint'] < 0 && $memberinfo['point'] < abs($setting['presentpoint'])) { showmessage(L('points_less_than', array('point' => $memberinfo['point'], 'need_point' => abs($setting['presentpoint']))), APP_PATH . 'index.php?m=pay&c=deposit&a=pay&exchange=point', 3000); } if ($category['type'] != 0) { showmessage(L('illegal_operation')); } $modelid = $category['modelid']; require CACHE_MODEL_PATH . 'content_form.class.php'; $content_form = new content_form($modelid, $catid, $CATEGORYS); $data = array('zone' => $zone, 'city' => $cityid); $forminfos_data = $content_form->get($data); $forminfos = array(); foreach ($forminfos_data as $_fk => $_fv) { if ($_fv['isomnipotent']) { continue; } if ($_fv['formtype'] == 'omnipotent') { foreach ($forminfos_data as $_fm => $_fm_value) { if ($_fm_value['isomnipotent']) { $_fv['form'] = str_replace('{' . $_fm . '}', $_fm_value['form'], $_fv['form']); } } } $forminfos[$_fk] = $_fv; } $formValidator = $content_form->formValidator; //去掉栏目id unset($forminfos['catid']); $workflowid = $setting['workflowid']; header("Cache-control: private"); include template('member', 'info_content_publish'); } }
<TD width="24%">订单编号:</TD> <TD width="76%">'; echo $id; echo '</TD> </tr> <TR style="BACKGROUND-COLOR:#ffffff" height=22 level="0"> <TD>会员编号:</TD> <TD>'; echo $order_username; echo '</TD> </tr> <TR> <TD valign="middle" bgColor="#FBFDFF" >详细收货地址:</TD> <TD align="left" valign="middle" bgColor="#FBFDFF" > '; $address = getprovince($u_res["province"]) . "-" . getcity($u_res["city"]) . "-" . getarea($u_res["area"]) . $u_res["address"]; echo $address; echo ' <input type="hidden" name="address" value="'; echo $address; echo '"> </TD> </TR> <TR> <TD valign="middle" bgColor="#FBFDFF" >收货人:</TD> <TD align="left" valign="middle" bgColor="#FBFDFF" >'; echo $u_res["receiver"]; echo ' <input type="hidden" name="receiver" value="'; echo $u_res["receiver"]; echo '"></TD> </TR> <TR>
if ($kolor % 2 == 0) { $class = "bgcolor='#ffffff'"; } else { $class = "bgcolor='#fff'"; } ?> <tr <?php print $class; ?> > <td><small><?php print $kolor++; ?> .</small></td> <td><small><?php echo getcity(stripslashes($row["State_id"])); ?> </small></td> <td><small><?php echo stripslashes($row["District_name"]); ?> </small></td> <td> <a href="#" onClick="if(confirm('Do you really want to delete this record?')){ window.location.href='manage_city.php?id=<?php echo $row["id"]; ?> &type=del&token=<?php echo $token; ?> ' } " > <img src="images/drop.png" title="Delete" border="0" />
<td valign="top">State <span class="red">*</span></td> <td valign="top"> <div id="Divstate"> <select name="state" id="state" onChange="return CallDistrict(this.value)" class="form-control drop_down"> <option value="">Select State</option> <option value="<?php echo $result['State']; ?> " <?php if (isset($result['id']) && $result['State'] == $result['State']) { ?> selected<?php } ?> ><?php echo getcity(stripslashes(ucfirst($result['State']))); ?> </option> </select> </div> </td> </tr> <tr> <td>District <span class="red">*</span></td> <td valign="top"><div id="divdistrict"> <select name="district" id="district" class="form-control drop_down" onChange="return CallCity(this.value)"> <option value="">Select District</option> <option value="<?php echo $result['District_id']; ?> " <?php if (isset($result['id']) && $result['District_id'] == $result['District_id']) {
?> </small></td> <td><small><?php echo stripslashes($row["address"]); ?> </small></td> <td><small><?php echo getstate(stripslashes($row["state"])); ?> </small></td> <td><small><?php echo getdistrict(stripslashes($row["district"])); ?> </small></td> <td><small><?php echo getcity(stripslashes($row["city"])); ?> </small></td> <td><small><?php echo getarea(stripslashes($row["area"])); ?> </small></td> <td><small><?php echo stripslashes($row["Cdate"]); ?> </small></td> <td><a href="assign_service.php?cust_id=<?php echo $row["Cid"]; ?> &token=<?php echo $token;
<tr> <td>New Localities :</td> <td><textarea name="locality" id="textarea2" cols="60" rows="6"></textarea></td> </tr> <tr> <td> </td> <td><input type="submit" name="button2" id="button2" value="Save" /></td> </tr> </table> </form> <?php } else { if ($step == 2) { $sid = $_POST['state']; $city = getcity(0, $sid, 1); ?> <form id="form3" name="form3" method="post" action="addlocality.php?step=3"> <table width="500" border="0" cellspacing="0"> <tr> <td width="112">Select City</td> <td width="384"><select name="city" id="select2"> <?php foreach ($city as $val) { $val = explode(':', $val); echo '<option value="' . $val[0] . '">' . $val[1] . '</option>'; } ?> </select></td> </tr> <tr>
echo "是"; } else { echo "否"; } echo '</TD> </TR>--> <TR> <TD valign="middle" bgColor="#FBFDFF" align="right">性别:</TD> <TD height="38" align="left" valign="middle" bgColor="#FBFDFF" >'; echo $rs["sex"]; echo '</TD> </TR> <TR> <TD valign="middle" bgColor="#FBFDFF" align="right">省份、城市、地区:</TD> <TD height="38" align="left" valign="middle" bgColor="#FBFDFF" >'; echo getprovince($rs["province"]) . "-" . getcity($rs["city"]) . "-" . getarea($rs["area"]); echo '</TD> </TR> <TR> <TD valign="middle" bgColor="#FBFDFF" align="right">收货地址:</TD> <TD height="38" align="left" valign="middle" bgColor="#FBFDFF" >'; echo $rs["address"]; echo '</TD> </TR> <TR> <TD valign="middle" bgColor="#FBFDFF" align="right">收货人:</TD> <TD height="38" align="left" valign="middle" bgColor="#FBFDFF" >'; echo $rs["receiver"]; echo '</TD> </TR> <TR>
$telport = $_POST["telport"]; $mail = $_POST["mail"]; $temps = 999; //$temps = $_POST["temps"]; $csp = $_POST["csp"]; $equipement = $_POST["equipement"]; $utilisation = $_POST["utilisation"]; $connaissance = $_POST["connaissance"]; $info = $_POST["info"]; $loginn = $_POST["login"]; $passs = $_POST["passw"]; // Traitement des champs a insérer if (!$nom || !$prenom || !$annee || !$loginn) { $mess = getError(4); } else { $resultville = getcity($ville); if (strcmp($resultville, "Autres") != 0) { $code_postale = ""; $commune_autre = ""; $pays = ""; } if (FALSE == checkLoginUpdate($loginn, $id)) { $mess = getError(5); } else { $result = modUserbyuser($id, $nom, $prenom, $sexe, $jour, $mois, $annee, $adresse, $code_postale, $commune_autre, $ville, $pays, $tel, $telport, $mail, $temps, $csp, $equipement, $utilisation, $connaissance, $info, $loginn, $passs); if ($result == FALSE) { $mess = getError(0); } else { $mess = getError(14); } }
include 'sqlcon.php'; include 'kartlib.php'; $step = $_GET['step']; if ($step == 2) { $sid = $_POST['state']; if ($_POST['save']) { $cities = $_POST['cities']; $cities = explode(',', $cities); foreach ($cities as $val) { $q = "INSERT INTO `city` (\n`cid` ,\n`sid` ,\n`name`\n)\nVALUES (\nNULL , '{$sid}', '{$val}'\n)"; mysql_query($q) or die('MySQL Error(3)!!'); } } $state = getstate($sid); $city = getcity(0, $sid, 0); $city = implode(',', $city); ?> <form id="form2" name="form2" method="post" action="addcity.php?step=2"> <table width="612" border="0" cellspacing="0"> <tr> <td width="171">State :</td> <td width="437"><?php echo $state; ?> <input name="state" type="hidden" id="hiddenField" value="<?php echo $sid; ?> " /> <input name="save" type="hidden" id="hiddenField2" value="1" /></td> </tr>