| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- if (!defined('IN_MYMPS')) {
- exit('Forbidden');
- }
- $ac = !in_array($ac, array('person', 'com', 'sjrz')) ? 'person' : trim($ac);
- if (submit_check('certify_submit')) {
- require_once MYMPS_INC . '/upfile.fun.php';
- $name_file = 'certify_image';
- if ($ac == 'person') {
- $typeid = 2;
- }
- else if ($ac == 'com') {
- $typeid = 1;
- }
- else if ($ac == 'sjrz') {
- $typeid = 3;
- if (!$mobile) {
- write_msg('请输入您的手机号码!');
- }
- if (!is_mobile($mobile)) {
- write_msg('手机号格式不正确!');
- }
- $smscheckcode = $smscheckcode ? mhtmlspecialchars($smscheckcode) : '';
- if (!mymps_chk_smsrandcode($smscheckcode, $mobile)) {
- write_msg('手机验证码输入不正确或与手机号不匹配!');
- }
- $db->query('UPDATE `' . $db_mymps . 'member` SET sj_certify = \'1\',mobile=\'' . $mobile . '\' WHERE userid = \'' . $s_uid . '\'');
- write_msg('', '?m=certify&ac=sjrz&success=8');
- exit();
- }
- if ($_FILES[$name_file]['name']) {
- check_upimage($name_file);
- $destination = '/certification/' . date('Ym') . '/';
- $mymps_image = start_upload($name_file, $destination, 0);
- $db->query('INSERT INTO `' . $db_mymps . 'certification` SET typeid=\'' . $typeid . '\',userid=\'' . $s_uid . '\',img_path=\'' . $mymps_image . '\',pubtime = \'' . $timestamp . '\'');
- }
- else {
- write_msg('', '?m=certify&error=13');
- }
- write_msg('', '?m=certify&success=9');
- }
- else {
- if ($pubtime = $db->getOne('SELECT pubtime FROM `' . $db_mymps . 'certification` ' . $where . ' ORDER BY pubtime DESC')) {
- $certifylang = '您已经于' . GetTime($pubtime) . '提交过认证图片,确认要重新提交吗?';
- }
- $location = location();
- include mymps_tpl('certify');
- }
- ?>
|