<?php //弹出一键填单相关ajax数据处理 include "../common.inc.php"; InitGP(array("action", "url", "refuname", "referer", "aid", "cityid")); //初始化变量全局返回 $goodsobj = new TableClass('goods', 'gid'); AjaxHead(); if ($action == 'addbuynum') { $jsondata = json_decode(str_replace("'", '"', file_get_contents('php://input'))); $gid = GetNum($jsondata->pid); $wheresqlarr = "gid=" . $gid; addfield($goodsobj->table, 'buynum', $wheresqlarr, 1); echo json_encode('OK'); exit; } else { if ($action == 'add') { //抓取商品加入购物车ajax $strjson = str_replace("'", '"', stripslashes($_POST['adddata'])); $pdata = json_decode($strjson); $p_name = Char_cv($pdata->name); $p_price = GetNum($pdata->price); $p_fee = GetNum($pdata->freight); $p_num = GetNum($pdata->buyNum); $p_note = Char_cv($pdata->remark); $p_url = Char_cv($pdata->href); $p_size = Char_cv($pdata->chicun); $p_color = Char_cv($pdata->yanse); $p_saler = Char_cv($pdata->shopName); $s_url = Char_cv($pdata->shopHref); $picture = Char_cv($pdata->picture);
//获取数据 //print_r($dataarray); include template('recommend_list'); //包含输出指定模板 } elseif ($action == 'view') { $gid = GetNum($gid); $value = $goodsobj->getone($gid); $gtype = $typeobj->getone($value['gtypeid']); if ($gtype['node'] == 0) { $position = "<span>></span><a href='recommend.php?action=list&tid=" . $gtype['typeid'] . "'>" . $gtype['typename'] . "</a>"; } else { $cgtype = $typeobj->getone($gtype['node']); $position = "<span>></span><a href='recommend.php?action=list&tid=" . $cgtype['typeid'] . "'>" . $cgtype['typename'] . "</a>"; $position .= "<span>></span><a href='recommend.php?action=list&tid=" . $gtype['typeid'] . "'>" . $gtype['typename'] . "</a>"; } $leftarray = $goodsobj->getdata(10, "flag='c'", 'buynum desc,gid desc', 'gid,gtypeid,goodsurl,goodsname,goodsprice,goodsseller,goodsimg,sellerurl,shopname,rindex,views,buynum,listorder,flag,addtime'); addfield($goodsobj->table, 'views', "gid=" . $gid, 1); //增加浏览次数 include template('recommend_view'); //包含输出指定模板 } else { $rightarray = $goodsobj->getdata(6, "flag='c'", 'listorder asc,gid desc', 'gid,gtypeid,goodsurl,goodsname,goodsprice,goodsseller,goodsimg,sellerurl,shopname,rindex,views,buynum,listorder,flag,addtime'); $rightuserarray = $goodsobj->getdata(6, "flag='c' and usertype=1 and Audit=1", 'listorder asc,gid desc', 'gid,gtypeid,usertype,uname,goodsurl,goodsname,goodsprice,goodsseller,goodsimg,sellerurl,shopname,rindex,views,buynum,listorder,flag,why,addtime'); $leftarray = $goodsobj->getdata(10, "flag='c'", 'buynum desc,gid desc', 'gid,gtypeid,goodsurl,goodsname,goodsprice,goodsseller,goodsimg,sellerurl,shopname,rindex,views,buynum,listorder,flag,addtime'); $specialobj = new TableClass('special', 'sid'); $topcarray = $specialobj->getdata(3, "flag='tj'", 'listorder asc,sid desc', 'sid,title,flag,about,pic,listorder,addtime'); //print_r($rightarray); //print_r($leftarray); include template('recommend'); //包含输出指定模板 }
//build form $html = $buildform->start_table('name'); $html .= $buildform->add_header('Add/Edit ' . $listtitle, 'banner'); $html .= addfield('name'); $html .= $buildform->add_header('HTML for Display Pages'); $html .= addfield('list_html', 'List HTML', 'textarea', $R->Fields("list_html"), '', '55', '15'); $html .= addfield('detail_html', 'Detail HTML', 'textarea', $R->Fields("detail_html"), '', '55', '15'); $html .= $buildform->add_header('SQL'); $html .= addfield('sql', 'SQL', 'textarea', $R->Fields("sql")); $html .= addfield('sql_order'); $html .= addfield('display_fields', 'Display Fields', 'textarea', $R->Fields("display_fields")); $html .= $buildform->add_header('Fields for Grouping'); $html .= addfield('sort_field'); $html .= addfield('sort_class', "Sort HTML", 'textarea', $R->Fields("sort_class")); $html .= addfield('sort_field2'); $html .= addfield('sort_class2', "2nd Level Sort HTML", 'textarea', $R->Fields("sort_class2")); $html .= $buildform->add_header('Module and Text Page IDs'); $html .= addfield('mod_id'); $html .= addfield('mod_intro_list_id'); $html .= addfield('mod_intro_detail_id'); $html .= $buildform->add_content($buildform->add_btn() . ' ' . $buildform->del_btn() . $rec_id->fetch()); $html .= $buildform->end_table(); $form =& new Form(); $form->set_contents($html); include "header.php"; if ($_GET['action'] == "list") { listpage($listtitle, $listsql, $fieldsarray, $filename, $orderby, $sort, $extra); } else { echo $form->fetch(); } include "footer.php";
$html .= addfield('subject', 'Subject', 'text', $R->Fields("subject")); $html .= addfield('from_email', 'From Email', 'text', $R->Fields("from_email")); $html .= addfield('from_name', 'From Name', 'text', $R->Fields("from_name")); $html .= addfield('reply_to_address', 'Reply To Address', 'text', $R->Fields("reply_to_address")); $WYSIWYG =& AMPFormElement_HTMLEditor::instance(); $WYSIWYG->addEditor('message_email_html'); $html .= addfield('message_email_html', 'HTML Email Message', 'textarea', $R->Fields("message_email_html")); $html .= addfield('message_email_text', 'Text Email Message', 'textarea', $R->Fields("message_email_text")); #$html .= addfield('embargo','Embargoed Till','text',$R->Fields("embargo")); $list_options = makelistarray($List, 'id', 'name', 'Select List'); $lists =& new Select('list_ID', $list_options, $R->Fields("list_ID")); $html .= $buildform->add_row('Send to List', $lists); $t_options = makelistarray($T, 'id', 'name', 'Select Template'); $temp =& new Select('message_template_ID', $t_options, $R->Fields("message_template_ID")); $html .= $buildform->add_row('HTML Email Template', $temp); $html .= addfield('publish', 'Show Email on Website', 'checkbox', $R->Fields("publish")); $html .= $buildform->add_content($buildform->add_btn() . ' ' . $buildform->del_btn() . $rec_id->fetch() . $sendformat->fetch() . $blast_type->fetch()); $html .= $buildform->end_table(); $form =& new Form(); $form->set_contents($html); include "header.php"; if ($_GET['action'] == "list") { if ($_REQUEST['response']) { echo '<p><b>' . $_REQUEST['response'] . '</b></p>'; } listpage($listtitle, $listsql, $fieldsarray, $filename, $orderby, $sort, $extra); echo '<p><a href="#" onClick="newwindow=window.open(\'blast_control.php?type=Email&process=1\',\'name\',\'height=20,width=150\'); alert (\'You may close the pop up window and your message will send without interpution\')" >START SENDING NEW EMAIL BLASTS</a></p>'; } else { echo $form->fetch(); echo $WYSIWYG->output(); }
require ("../Connections/dataactions.php"); ob_end_flush(); } if (isset($_GET['id'])) { $R__MMColParam = $_GET['id']; } else {$R__MMColParam = "8000000";} $R=$dbcon->Execute("SELECT * FROM $table WHERE id = $R__MMColParam") or DIE($dbcon->ErrorMsg()); $rec_id = & new Input('hidden', 'MM_recordId', $_GET['id']); //build form $html = $buildform->start_table('name'); $html .= $buildform->add_header('Add/Edit '.$listtitle, 'banner'); $html .= addfield('title','Region','text',$R->Fields("title")); $html .= $buildform->add_content($buildform->add_btn() .' '. $buildform->del_btn().$rec_id->fetch()); $html .= $buildform->end_table(); $form = & new Form(); $form->set_contents($html); include ("header.php"); if ($_GET['action'] == "list") { listpage($listtitle,$listsql,$fieldsarray,$filename,$orderby,$sort,$extra); } else { echo $form->fetch(); } include ("footer.php"); ?>
$listtitle = "Subscribed Feeds"; $listsql = "select * from {$table} WHERE(isNull(service) OR service='Content') "; $orderby = " order by id desc "; $fieldsarray = array('ID' => 'id', 'Title' => 'title', 'URL' => 'url'); $url = $_POST['rss_url']; if (!$url) { $url = $_GET['rss_url']; } $opml = $_POST['opml_url']; $file = $_POST['opml_file']; $maxfilesize =& new Input('hidden', 'MAX_FILE_SIZE', '100000'); $html = $buildform->start_table('name'); $html .= $buildform->add_header('Add RSS Feed', 'banner'); $html .= $buildform->add_content($maxfilesize->fetch()); $html .= addfield('rss_url', 'RSS or Weblog URL:', 'text'); $html .= addfield('opml_url', 'OPML URL:', 'text'); $html .= $buildform->add_content($buildform->add_btn()); $html .= $buildform->end_table(); $form =& new Form(); $form->set_contents($html); include "header.php"; echo $form->fetch(); if ($url) { fof_add_feed($url); } if ($opml) { if (!($content_array = file($opml))) { echo "Cannot open {$opml}<br>"; return false; } $content = implode("", $content_array);
if (empty($username) || empty($password)) { showmsg("用户名或者密码为空", "-1"); exit; } $row = $db->fetch_first("Select * From {$tablepre}admin where adminname like '{$username}' "); if (is_array($row)) { if (md5($password) != $row['adminpwd']) { $log_file = ROOT_PATH . '/data/adminlogin_safe.txt'; if (function_exists('real_ip')) { $userIP = real_ip(); } else { $userIP = ""; } $getUrl = geturl(); fputs(fopen($log_file, 'a+'), date('Y-m-d H:i:s') . "||{$userIP}||{$getUrl}||{$username}||{$password}||登陆失败\r\n"); showmsg("用户名或者密码错误", "-1"); exit; } else { $adminauth = $row['adminid'] . "\t" . $username . "\t" . $row['adminpwd']; set_cookie('adminauth', cookie_authcode($adminauth, 'ENCODE'), time() + 3600 * 12); //设置12个小时cookie有效期 addfield("admin", "logincount", "adminname='{$username}'", 1); //更新登录次数 editstate("admin", "lastlogin", "adminname='{$username}'", $timestamp); //更最后登录时间 showmsg("登录成功!", "index.php"); } } else { showmsg("用户名不存在", "-1"); } }
$th_img= '<P><img align="center" width=100 src="http://'.$_SERVER['SERVER_NAME'].'/img/thumb/'.$subtype->Fields("image2").'" id="active_thumb"'.$th_style.'>'; echo $buildform->add_row('Section Image (for lists)'.$th_img, $Gal); ?> <script type="text/javascript"> function art_showThumb(imgname) { th_img = document.getElementById('active_thumb'); th_img.src='http://'+window.location.host+"/"+imgname; th_img.style.display="block"; } </script> <tr class="text"> <td valign="top"><div align="right"></div></td> <td><p><a href="#" onclick="change2('upload');" >Upload Image</a></td> </tr><tr><td colspan="2"><div id="upload" style="display:none;"><table width="100%" border="0" align="center"> <?php echo addfield('file','Upload New Image <br>(jpg files only)','file','','Select image');?> </table></div> </td></tr><tr class="text"> <td valign="top"><div align="right"></div></td> </tr> </tr> <tr> <?php $filelist = AMPfile_list('img/'); $galattr= 'onChange="art_showThumb2(\'img/\'+this.value);"'; $Gal = & new Select('flash',$filelist,$subtype->Fields("flash"),false,10,null,null,$galattr); $th_style2 = $subtype->Fields("flash")?null:" style='display:none' "; $th_img2= '<P><img align="center" width=100 src="http://'.$_SERVER['SERVER_NAME'].'/img/'.$subtype->Fields("flash").'" id="active_thumb2"'.$th_style2.'>';
$MM_editRedirectUrl = $filename . "?action=list"; $MM_editColumn = "id"; $MM_fieldsStr = "name|value"; $MM_columnsStr = "name|',none,''"; //|$delim,$altVal,$emptyVal| |',none,''| require "Connections/insetstuff.php"; require "Connections/dataactions.php"; ob_end_flush(); } if (isset($_GET['id'])) { $R__MMColParam = $_GET['id']; } else { $R__MMColParam = "8000000"; } $R = $dbcon->Execute("SELECT * FROM {$table} WHERE id = {$R__MMColParam}") or die($dbcon->ErrorMsg()); $rec_id = new Input('hidden', 'MM_recordId', $_GET['id']); //build form $html = $buildform->start_table('name'); $html .= $buildform->add_header('Add/Edit ' . $listtitle, 'banner'); $html .= addfield('name', 'Event Type', 'text', $R->Fields("name")); $html .= $buildform->add_content($buildform->add_btn() . ' ' . $buildform->del_btn() . $rec_id->fetch()); $html .= $buildform->end_table(); $form = new Form(); $form->set_contents($html); require_once "header.php"; if ($_GET['action'] == "list") { listpage($listtitle, $listsql, $fieldsarray, $filename, $orderby, $sort, $extra); } else { echo $form->fetch(); } require_once "footer.php";
require "../Connections/dataactions.php"; ob_end_flush(); } $G = $dbcon->Execute("SELECT id, galleryname FROM gallerytype") or die($dbcon->ErrorMsg()); $html = $buildform->start_table('name'); $html .= $buildform->add_header('Photo Gallery Settings'); $html .= addfield('add', 'Add to Gallery', 'checkbox'); $html .= addfield('publish', 'Publish', 'checkbox'); $gal_options = makelistarray($G, 'id', 'galleryname', 'Select Gallery'); $Gal =& new Select('galleryid', $gal_options); $html .= $buildform->add_row('Photo Gallery', $Gal); $html .= addfield('caption', 'Caption', 'textarea'); $Type =& new Select('section', $obj->select_type_tree2(0)); $html .= $buildform->add_row('Section', $Type); $html .= addfield('photoby', 'Photo By', 'text'); $html .= addfield('date', 'Date', 'text'); $html .= $buildform->end_table(); echo "<h2>Image Upload</h2> "; if (isset($result_message)) { echo '<br>' . $result_message . '<br><br><br>'; } ?> <p><strong><!--Upload .JPG Image Files Only (<a href="imgother_upload.php">click here</a> for other formats, --> <a href="crop_step1.php" target="_blank">Click here</a> to upload a .JPG you want to crop) </strong></p> <form method="POST" action="<?php echo $MM_editAction; ?> " enctype="multipart/form-data"> <?php echo $buildform->start_table('name'); echo $buildform->add_header('Upload Image');
$arrayadd['goodsnum'] = GetNum($pieceNum); $arrayadd['type'] = 2; $arrayadd['goodsremark'] = Char_cv(pieceRemark); $arrayadd['addtime'] = time(); $arrayadd['uptime'] = time(); $arrayadd['state'] = 1; $arrayadd['pinoid'] = GetNum($oid); $info = $Table->add($arrayadd); if (GetNum($info)) { include_once INC_PATH . "/member.class.php"; $m = new memberclass(); $note = lang('Buy') . "<a href=\\'" . $value['goodsurl'] . "\\' target=\\'_blank\\'>《" . $value['goodsname'] . "》</a> " . GetNum($pieceNum) . lang('Pieces_order_ID') . $info; $tempmoney = $value['goodsprice'] * GetNum($pieceNum); $m->moneyedit($_USERS['uname'], -$tempmoney, 1, $note); //扣去账户余额 addfield("order", "pinnum", "oid={$oid}", 1); //更改状态操作 showmsg(lang('fight_sucess'), PHP_SELF); //出错! } else { showmsg(lang('fight_lose'), "-1"); //出错! } } //utf-8过滤用于搜索的字符串 function FilterSearch($keyword) { $keyword = ereg_replace("[\"\r\n\t\$\\><']", '', $keyword); if ($keyword != stripslashes($keyword)) { return ''; } else {
$rec_id = & new Input('hidden', 'MM_recordId', $_GET['id']); //build form $html = $buildform->start_table('name'); $html .= $buildform->add_header('Add/Edit '.$listtitle, 'banner'); $html .= addfield('merchant_ID','Merchant_ID','text',$R->Fields("merchant_ID")); $html .= addfield('name','Name','text',$R->Fields("name")); $html .= addfield('description','Description','text',$R->Fields("description")); $html .= addfield('Amount','Amount','text',$R->Fields("Amount")); $html .= addfield('Amount_Array','Amount Array','text',$R->Fields("Amount_Array")); $html .= addfield('Amount_Other','Amount_Other','text',$R->Fields("Amount_Other")); $html .= addfield('Tax_Status','Tax_Status','text',$R->Fields("Tax_Status")); $html .= addfield('Donation_Limit','Donation_Limit','text',$R->Fields("Donation_Limit")); $html .= addfield('Thank_You_Email','Thank_You_Email','text',$R->Fields("Thank_You_Email")); $html .= addfield('Email_Alert','Email_Alert','text',$R->Fields("Email_Alert")); $html .= addfield('Alert_Customer','Alert_Customer','text',$R->Fields("Alert_Customer")); $html .= addfield('Alert_Merchant','Alert_Merchant','text',$R->Fields("Alert_Merchant")); $html .= $buildform->add_content($buildform->add_btn() .' '. $buildform->del_btn().$rec_id->fetch()); $html .= $buildform->end_table(); $form = & new Form(); $form->set_contents($html); include ("header.php"); if ($_GET['action'] == "list") { listpage($listtitle,$listsql,$fieldsarray,$filename,$orderby,$sort,$extra); } else { echo $form->fetch(); } include ("footer.php"); ?>
?> </td></tr> <?php if ($AMP_customartfield1 or $AMP_customartfield2 or $AMP_customartfield3 or $AMP_customartfield4) { echo $buildform->add_header('Custom AMP Fields'); if ($AMP_customartfield1) { echo addfield($AMP_customartfield1[0], $AMP_customartfield1[1], $AMP_customartfield1[2], $r->Fields("custom1"), $AMP_customartfield1[4]); } if ($AMP_customartfield2) { echo addfield($AMP_customartfield2[0], $AMP_customartfield2[1], $AMP_customartfield2[2], $r->Fields("custom2"), $AMP_customartfield2[4]); } if ($AMP_customartfield3) { echo addfield($AMP_customartfield3[0], $AMP_customartfield3[1], $AMP_customartfield3[2], $r->Fields("custom3"), $AMP_customartfield3[4]); } if ($AMP_customartfield4) { echo addfield($AMP_customartfield4[0], $AMP_customartfield4[1], $AMP_customartfield4[2], $r->Fields("custom4"), $AMP_customartfield4[4]); } } ?> <tr class="intitle"> <td colspan="2" valign="top"><?php echo helpme("Editor Notes"); ?> Page Specific Navigation Text </td> </tr> <tr> <td colspan="2" valign="top"><textarea name="navtext" cols="65" rows="5" wrap="VIRTUAL" id="navtext"><?php echo htmlspecialchars($r->Fields("navtext")); ?> </textarea></td>
require "../Connections/insetstuff.php"; require "../Connections/dataactions.php"; ob_end_flush(); } if (isset($_GET['id'])) { $R__MMColParam = $_GET['id']; } else { $R__MMColParam = "8000000"; } $R = $dbcon->Execute("SELECT * FROM {$table} WHERE id = {$R__MMColParam}") or die($dbcon->ErrorMsg()); $rec_id =& new Input('hidden', 'MM_recordId', $_GET['id']); //build form $html = $buildform->start_table('name'); $html .= $buildform->add_header('Add/Edit ' . $listtitle, 'banner'); $html .= addfield('name', 'Template Name', 'text', $R->Fields("name")); $html .= addfield('description', 'Template Description', 'textarea', $R->Fields("description")); $html .= addfield('template', 'HTML Email Template<br>add [CONTENT] <br>where the content should appear', 'textarea', $R->Fields("template")); $WYSIWYG = AMPFormElement_HTMLEditor::instance(); $WYSIWYG->addEditor('template'); $html .= $buildform->add_content($buildform->add_btn() . ' ' . $buildform->del_btn() . $rec_id->fetch()); $html .= $buildform->end_table(); $form =& new Form(); $form->set_contents($html); include "header.php"; if ($_GET['action'] == "list") { listpage($listtitle, $listsql, $fieldsarray, $filename, $orderby, $sort, $extra); } else { echo $form->fetch(); echo $WYSIWYG->output(); } include "footer.php";
$html .= addfield('emfaq','System Adminsitrators Email Address','text'); $html .= $buildform->add_header('Top Level Sections'); $html .= addfield('section1','Section Name','text'); $html .= addfield('desc_section1','Intro Text','textarea'); $html .= addfield('section2','Section Name','text'); $html .= addfield('desc_section2','Intro Text','textarea'); $html .= addfield('section3','Section Name','text'); $html .= addfield('desc_section3','Intro Text','textarea'); $html .= addfield('section4','Section Name','text'); $html .= addfield('desc_section5','Intro Text','textarea'); $html .= addfield('section6','Section Name','text'); $html .= addfield('desc_section7','Intro Text','textarea'); $html .= addfield('section7','Section Name','text'); $html .= addfield('desc_section7','Intro Text','textarea'); $html .= addfield('section8','Section Name','text'); $html .= addfield('desc_section8','Intro Text','textarea'); //$html .= $buildform->add_colspan('', $object); $html .= $buildform->add_content($buildform->add_btn()); $html .= $buildform->end_table(); $form = & new Form(); $form->set_contents($html); include ("header.php"); echo $form->fetch(); include ("footer.php"); ?>
$MM_fieldsStr = "name|value|description|value|publish|value"; $MM_columnsStr = "name|',none,''|description|',none,''|publish|',none,''"; //|$delim,$altVal,$emptyVal| |',none,''| require "../Connections/insetstuff.php"; require "../Connections/dataactions.php"; ob_end_flush(); } if (isset($_GET['id'])) { $R__MMColParam = $_GET['id']; } else { $R__MMColParam = "8000000"; } $R = $dbcon->Execute("SELECT * FROM {$table} WHERE id = {$R__MMColParam}") or die($dbcon->ErrorMsg()); $rec_id =& new Input('hidden', 'MM_recordId', $_GET['id']); //build form $html = $buildform->start_table('name'); $html .= $buildform->add_header('Add/Edit ' . $listtitle, 'banner'); $html .= addfield('name', 'List Name', 'text', $R->Fields("name")); $html .= addfield('description', 'List Description', 'textarea', $R->Fields("description")); $html .= addfield('publish', 'Publish', 'checkbox', $R->Fields("publish"), '1'); $html .= $buildform->add_content($buildform->add_btn() . ' ' . $buildform->del_btn() . $rec_id->fetch()); $html .= $buildform->end_table(); $form =& new Form(); $form->set_contents($html); include "header.php"; if ($_GET['action'] == "list") { listpage($listtitle, $listsql, $fieldsarray, $filename, $orderby, $sort, $extra); } else { echo $form->fetch(); } include "footer.php";
$rec_id = & new Input('hidden', 'MM_recordId', $_GET['id']); //build form $html = $buildform->start_table('name'); $html .= $buildform->add_header('Add/Edit '.$listtitle, 'banner'); $html .= addfield('field','Line Description','text',$R->Fields("")); $html .= addfield('Merchant','Merchant','text',$R->Fields("Merchant")); $html .= addfield('Acount_Type','Acount_Type','text',$R->Fields("Acount_Type")); $html .= addfield('Account_Username','Account_Username','text',$R->Fields("Account_Username")); $html .= addfield('Account_Password','Account_Password','text',$R->Fields("Account_Password")); $html .= addfield('Server','Server','text',$R->Fields("Server")); $html .= addfield('Notes','Notes','text',$R->Fields("Notes")); $html .= addfield('Payment_Method','Payment_Method','text',$R->Fields("Payment_Method"),'CC'); $html .= addfield('Payment_Transaction','Payment_Transaction','text',$R->Fields("Payment_Transaction"),'AUTH_CAPTURE'); $html .= addfield('trans_key','trans_key','text',$R->Fields("trans_key")); $html .= $buildform->add_content($buildform->add_btn() .' '. $buildform->del_btn().$rec_id->fetch()); $html .= $buildform->end_table(); $form = & new Form(); $form->set_contents($html); include ("header.php"); if ($_GET['action'] == "list") { listpage($listtitle,$listsql,$fieldsarray,$filename,$orderby,$sort,$extra); } else { echo $form->fetch(); } include ("footer.php"); ?>