Server : Apache System : Linux iZ2vcgyutqttsd1p850kl8Z 3.10.0-1160.92.1.el7.x86_64 #1 SMP Tue Jun 20 11:48:01 UTC 2023 x86_64 User : www ( 1000) PHP Version : 5.6.40 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv Directory : /www/wwwroot/saimikebio.com/mobile/ |
<?php define('IN_ECTOUCH', true); require (dirname(__FILE__) . '/include/init.php'); session_start(); if(!empty($_SESSION['wxid'])) { $wxid = $_SESSION['wxid']; $wxch_message = ''; } if(!empty($_GET['wxid'])) { $wxid = $_GET['wxid']; $wxch_message = ''; } else { $wxch_message = '抽奖信息无效'; } if($_POST) { $wxid = $_POST['wxid']; $name = $_POST['name']; $phone = $_POST['phone']; $nickname = $db->getOne("SELECT `nickname` FROM ". $GLOBALS['ecs']->table('weixin_user') ." WHERE `wxid` = '$wxid' "); $time = time(); if(!empty($name) and !empty($phone)){ $pid_sql = "SELECT `id` FROM ". $GLOBALS['ecs']->table('weixin_prize_users') ." WHERE `wxid` = '$wxid' ORDER BY `dateline` DESC LIMIT 0 , 1"; $pid = $db->getOne($pid_sql); $sql = "INSERT INTO ". $GLOBALS['ecs']->table('weixin_prize_register') ." (`pid`, `wxid`, `nickname`, `name`, `phone`, `dateline` ) VALUES ('$pid','$wxid','$nickname' ,'$name' , '$phone', $time);"; $db->query($sql); $update_sql = "UPDATE ". $GLOBALS['ecs']->table('weixin_prize_users') ." SET `register` = '1' WHERE `id` ='$pid';"; $db->query($update_sql); } $wxch_message = '联系方式保存成功,我们会尽快联系您领取奖品'; } else { $smarty->assign('wxid', $wxid); } $smarty->assign('page_title','中奖联系方式填写'); $smarty->assign('wxch_message', $wxch_message); $smarty->display('wxch_contact.dwt');