Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
wp-admin
/
pdf-demo
:
xunpan-set.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php require_once('./admin.php'); if ( ! current_user_can( 'manage_options' ) ) wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) ); $title = __('General Settings'); $parent_file = 'options-general.php'; /* translators: date and time format for exact current time, mainly about timezones, see http://php.net/date */ $timezone_format = _x('Y-m-d G:i:s', 'timezone date format'); /** * Display JavaScript on the page. * * @since 3.5.0 */ function options_general_add_js() { ?><?php } add_action('admin_head', 'options_general_add_js'); include('./admin-header.php'); ?> <body class="wp-admin wp-core-ui no-js profile-php auto-fold admin-bar branch-3-6 version-3-6-1 admin-color-fresh locale-zh-cn no-customize-support" > <script type="text/javascript"> document.body.className = document.body.className.replace('no-js','js'); </script> <script type="text/javascript"> (function() { var request, b = document.body, c = 'className', cs = 'customize-support', rcs = new RegExp('(^|\\s+)(no-)?'+cs+'(\\s+|$)'); request = true; b[c] = b[c].replace( rcs, ' ' ); b[c] += ( window.postMessage && request ? ' ' : ' no-' ) + cs; }()); </script> <?php $email_info = get_post_meta(19,'_mail'); $email = $email_info[0]['recipient']; //print_r($email_info);exit; $phone = get_option('sms_phone_num',true); if(isset($_POST)){ if(preg_match('/^[a-z0-9]+([._-][a-z0-9]+)*@([0-9a-z]+\.[a-z]{2,14}(\.[a-z]{2})?)$/i',$_POST['email'])){ $tmp_email = $_POST['email']; if($email != $tmp_email){ $ttt = $email_info[0]; $ttt['recipient'] = $tmp_email; //print_r($ttt);exit; update_post_meta(19,'_mail',$ttt); echo '邮箱修改成功<br>'; $email_info = get_post_meta(19,'_mail'); $email = $email_info[0]['recipient']; } } if(preg_match("/^1[34578]{1}\d{9}$/",$_POST['phone'])){ $tmp_phone = $_POST['phone']; if(!$phone){ add_option('sms_phone_num','15208206317'); } $phone = get_option('sms_phone_num',true); if($tmp_phone != $phone){ update_option('sms_phone_num',$tmp_phone); echo '电话修改成功'; $phone = get_option('sms_phone_num',true); } } } ?> <div id="wpbody" style="text-align:left;padding-left: 20px;margin:-40px 0 0 0;"> <div id="wpbody-content" aria-label="Main content" tabindex="0"> <div aria-label="Main content" tabindex="0"> <div class="wrap" id="profile-page" style="background:#fff;margin:50px -20px 0px -20px;padding:20px;height:360px;"> <form id="your-profile" action="" method="post"> <table class="form-table"> <tr> <th><label for="pass1">接收信息邮箱</label></th> <td> <input type="text" name="email" id="email" size="16" value="<?php echo $email;?>" autocomplete="off" /> </td> </tr> <tr> <th scope="row"><label for="pass2">接收信息手机</label></th> <td> <input type="text" name="phone" id="phone" size="16" maxlength="11" value="<?php echo $phone;?>" autocomplete="off" /> <br /> </td> </tr> <tr> <th colspan="2">用于接收信息的电子邮箱和手机号,如新询盘通知、排名情况、数据报表等</th> </tr> </table> <p class="submit"> <input type="submit" name="submit" id="submit" class="button button-primary" value="保存设置" /> </p> </form> </div>