예제 #1
0
파일: send.php 프로젝트: noikiy/web
    //获取密码
    $content = trim($_POST[mess]);
    //获取短信内容
    $data = date("Y-m-d H:i:s");
    //获取时间
    $ip = getenv('REMOTE_ADDR');
    //获取IP地址
    while (list($name, $value) = each($_POST[colleague_tel])) {
        //读取要发送的电话号码
        if (is_numeric($value) == true) {
            //判断电话格式是否正确
            $mobilenumber = $value;
            //将获取的电话号码附给变量
            $msgtype = "Text";
            //指定短信为文本格式
            /*向数据库中添加发送短信的记录*/
            $sql = "insert into tb_short(short_ip,short_tel,short_tels,short_content,short_date,short_title)values('{$ip}','{$userid}','{$mobilenumber}','{$content}','{$data}','{$carrier}')";
            $rs = new com("adodb.recordset");
            $rs->open($sql, $conn, 3, 3);
            //执行添加语句
            /*------------------------*/
            include 'nusoap/lib/nusoap.php';
            //读取PHP类文件,实现短信的发送
            /*将数据以数组的形式添加到sendXml方法中*/
            $s = new soapclient('http://smsinter.sina.com.cn/ws/smswebservice0101.wsdl', 'WSDL');
            $s->call('sendXml', array('parameters' => array('carrier' => $carrier, 'userid' => $userid, 'password' => $password, 'mobilenumber' => $mobilenumber, 'content' => $content, 'msgtype' => $msgtype)));
            /*-------------------------------------*/
            echo "<script>alert('短信发送成功!');window.location.href='indexs.php?lmbs=连接短信';</script>";
        }
    }
}
예제 #2
0
function install_access()
{
    global $conn, $db_name, $db_prefix;
    $random = str_pad(mt_rand(1, pow(10, 8) - 1), 8, '0', STR_PAD_LEFT);
    $random .= str_pad(mt_rand(1, pow(10, 8) - 1), 8, '0', STR_PAD_LEFT);
    $random .= str_pad(mt_rand(1, pow(10, 8) - 1), 8, '0', STR_PAD_LEFT);
    $db_name = '#' . $random . '.mdb';
    $database = '../data/' . $db_name;
    if (!copy('#data.mdb', $database)) {
        echo '复制文件失败,您的网站目录可能没有写入权限,或者没有启用父路径。<br />';
        //echo '操作上若有不明之处,...';
        exit;
    }
    $connstr = 'provider=microsoft.jet.oledb.4.0;data source=' . realpath($database);
    $conn = new com('adodb.connection', NULL, 65001);
    $conn->open($connstr);
    //创建数据表
    $sql = "create table " . $db_prefix . "admin(\n\t\tadm_id long identity primary key,\n\t\tadm_username varchar(50),\n\t\tadm_password varchar(50),\n\t\tadm_grade long default 0,\n\t\tadm_power text,\n\t\tadm_prev_login long default 0,\n\t\tadm_last_login long default 0\n\t\t)";
    sql_query($sql);
    $sql = "create table " . $db_prefix . "advert(\n\t\tadv_id long identity primary key,\n\t\tadv_name varchar(50),\n\t\tadv_code text\n\t\t)";
    sql_query($sql);
    $sql = "create table " . $db_prefix . "article(\n\t\tart_id long identity primary key,\n\t\tart_channel_id long default 0,\n\t\tart_cat_id long default 0,\n\t\tart_lang varchar(50) default 'none',\n\t\tart_title varchar(250),\n\t\tart_img varchar(250),\n\t\tart_x_img varchar(250),\n\t\tart_more_img text,\n\t\tart_text text,\n\t\tart_short_text text,\n\t\tart_author text,\n\t\tart_attribute text,\n\t\tart_keywords varchar(250),\n\t\tart_description varchar(250),\n\t\tart_hits long default 0,\n\t\tart_add_time long default 0,\n\t\tart_best long default 0,\n\t\tart_top long default 0,\n\t\tart_index long default 0,\n\t\tart_show long default 1\n\t\t)";
    sql_query($sql);
    $sql = "create table " . $db_prefix . "att_art(\n\t\tatt_id long identity primary key,\n\t\tatt_channel_id long default 0,\n\t\tatt_cat_id long default 0,\n\t\tatt_lang varchar(50) default 'none',\n\t\tatt_code varchar(50),\n\t\tatt_name varchar(50),\n\t\tatt_top long default 0,\n\t\tatt_index long default 0,\n\t\tatt_show long default 1\n\t\t)";
    sql_query($sql);
    $sql = "create table " . $db_prefix . "cat_art(\n\t\tcat_id long identity primary key,\n\t\tcat_parent_id long default 0,\n\t\tcat_channel_id long default 0,\n\t\tcat_lang varchar(50) default 'none',\n\t\tcat_name varchar(50),\n\t\tcat_template varchar(50),\n\t\tcat_best long default 0,\n\t\tcat_top long default 0,\n\t\tcat_index long default 0,\n\t\tcat_show long default 1\n\t\t)";
    sql_query($sql);
    $sql = "create table " . $db_prefix . "channel(\n\t\tcha_id long identity primary key,\n\t\tcha_lang varchar(50) default 'none',\n\t\tcha_code varchar(50),\n\t\tcha_name varchar(50),\n\t\tcha_original long default 0,\n\t\tcha_top long default 0,\n\t\tcha_index long default 0,\n\t\tcha_show long default 1\n\t\t)";
    sql_query($sql);
    $sql = "create table " . $db_prefix . "comment(\n\t\tcom_id long identity primary key,\n\t\tcom_channel_id long default 0,\n\t\tcom_lang varchar(50) default 'none',\n\t\tcom_page_id long default 0,\n\t\tcom_username varchar(50),\n\t\tcom_email varchar(50),\n\t\tcom_text text,\n\t\tcom_reply text,\n\t\tcom_rank long default 0,\n\t\tcom_add_time long default 0,\n\t\tcom_show long default 1\n\t\t)";
    sql_query($sql);
    $sql = "create table " . $db_prefix . "link(\n\t\tlin_id long identity primary key,\n\t\tlin_lang varchar(50) default 'none',\n\t\tlin_word varchar(50),\n\t\tlin_url varchar(250),\n\t\tlin_img varchar(250),\n\t\tlin_title varchar(100),\n\t\tlin_lock long default 0,\n\t\tlin_top long default 0,\n\t\tlin_index long default 0,\n\t\tlin_show long default 1\n\t\t)";
    sql_query($sql);
    $sql = "create table " . $db_prefix . "menu(\n\t\tmen_id long identity primary key,\n\t\tmen_lang varchar(50) default 'none',\n\t\tmen_type varchar(50),\n\t\tmen_name varchar(50),\n\t\tmen_url varchar(250),\n\t\tmen_top long default 0,\n\t\tmen_index long default 0,\n\t\tmen_show long default 1\n\t\t)";
    sql_query($sql);
    $sql = "create table " . $db_prefix . "message(\n\t\tmes_id long identity primary key,\n\t\tmes_lang varchar(50) default 'none',\n\t\tmes_type varchar(50),\n\t\tmes_username varchar(50),\n\t\tmes_email varchar(50),\n\t\tmes_title varchar(100),\n\t\tmes_text text,\n\t\tmes_reply text,\n\t\tmes_add_time long default 0,\n\t\tmes_show long default 1\n\t\t)";
    sql_query($sql);
    $sql = "create table " . $db_prefix . "safe(\n\t\tsaf_id long identity primary key,\n\t\tsaf_ip varchar(50),\n\t\tsaf_action varchar(50),\n\t\tsaf_time long default 0\n\t\t)";
    sql_query($sql);
    $sql = "create table " . $db_prefix . "varia(\n\t\tvar_id long identity primary key,\n\t\tvar_lang varchar(50) default 'none',\n\t\tvar_name varchar(50),\n\t\tvar_value varchar(250),\n\t\tvar_text text\n\t\t)";
    sql_query($sql);
}
예제 #3
0
파일: short_gl.php 프로젝트: noikiy/web
</head>

<body>
<table width="97%" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#EBEBEB">
  
  <tr>
    <td height="21" colspan="2" align="center" bgcolor="#E9F7FD"><span class="STYLE1">常用短语</span></td>
    <td colspan="2" align="center" bgcolor="#E9F7FD"><span class="STYLE1">短语类别</span></td>
    <td colspan="3" align="center" bgcolor="#E9F7FD"><a href="#" class="STYLE1" onClick="MM_openBrWindow('insert_note.php','','toolbar=yes,width=440,height=219')">添加</a></td>
  </tr>
  
 <?php 
include "conn/conn.php";
$sql = "select * from tb_note";
$ress = new com("adodb.recordset");
$ress->open($sql, $conn, 3, 3);
$res->pagesize = 10;
if (trim(intval($_GET[page])) == "" || intval($_GET[page]) > $ress->pagecount || intval($_GET[page]) <= 0) {
    $page = 1;
} else {
    $page = intval($_GET[page]);
}
if ($ress->eof || $ress->bof) {
    ?>
	<tr>
      <td height="20" colspan="7" align="center" bgcolor="#F8F8F8"><div align="center" class="STYLE1">没有信息!</div></td>
  </tr>
	
	<?php 
} else {
    $ress->absolutepage = $page;
예제 #4
0
<?php

include "conn/conn.php";
if ($Submit == "提交") {
    $sql = "insert into tb_note(note_content,note_category)values('" . $note_content . "','" . $note_category . "')";
    $rs = new com("adodb.recordset");
    $rs->open($sql, $conn, 3, 1);
    echo "<script>alert('短语添加成功!');history.back();</script>";
}
예제 #5
0
파일: index.php 프로젝트: noikiy/web
 public function chkuser()
 {
     include_once "conn/conn.php";
     $rs = new com("adodb.recordset");
     //创建记录集对象
     $rs->open("select * from tb_user where username='******' and userpwd='" . $this->pwd . "'", $conn, 3, 1);
     if ($rs->eof || $rs->bof) {
         echo "<script>alert('对不起,密码或用户名错误!');history.back();</script>";
         exit;
     } else {
         session_register("username");
         //创建一个变量
         $username = $name;
         /*       
         	          
         			   session_register("producelist");   //电话号码存储车
         			   $producelist="";                   //默认值为空
         			   session_register("quatity");       
         			    $quatity="";
                 session_register("producelists");  
         			   $producelists="";
         			   session_register("quatitys");
         			    $quatitys="";
                  
                 session_register("producelistes");  //常用短语存储车
         			   $producelistes="";
         			   session_register("quatityes");
         			   $quatityes="";
         */
         $data = substr(date("Y-n-j"), 5, 50);
         $rss = new com('adodb.recordset');
         //创建记录集对象
         $rss->open("select * from tb_colleague where colleague_birthday='" . $data . "'", $conn, 3, 1);
         $res = new com('adodb.recordset');
         //创建记录集对象
         $res->open("select * from tb_customer where customer_birthday='" . $data . "'", $conn, 3, 1);
         if ($rss->eof and $res->eof) {
             echo "<script>alert('登录成功!');window.location.href='indexs.php';</script>";
             // echo "<meta http-equiv=\"Refresh\" content=\"3;url=indexs.php\">登录成功,3秒钟转入前页,请稍等......";
         } else {
             echo "今天是";
             $data = substr(date("Y-n-j"), 5, 50);
             $rss = new com('adodb.recordset');
             //创建记录集对象
             $rss->open("select * from tb_colleague where colleague_birthday='" . $data . "'", $conn, 3, 1);
             while (!$rss->eof) {
                 $fields = $rss->fields(colleague_name);
                 $birthday = $fields->value;
                 echo $birthday . ".";
                 $rss->movenext;
             }
             $res = new com('adodb.recordset');
             //创建记录集对象
             $res->open("select * from tb_customer where customer_birthday='" . $data . "'", $conn, 3, 1);
             while (!$res->eof) {
                 $fields = $res->fields(customer_name);
                 $birthday = $fields->value;
                 echo $birthday . ".";
                 $res->movenext;
             }
             echo "的生日";
             echo "<meta http-equiv=\"Refresh\" content=\"10;url=indexs.php\">10秒钟转入主页,请稍等......";
         }
     }
 }
예제 #6
0
<?php

session_start();
include "conn/conn.php";
if ($check == "") {
    echo "<script>alert('请选择要删除的邮件!');history.back();</script>";
} else {
    $ress = new com("adodb.recordset");
    while (list($name, $value) = each($_POST[check])) {
        $sql = 'delete from tb_mail where mail_id=' . $value . '';
        $ress->open($sql, $conn, 3, 1);
    }
    echo "<script>alert('邮件发送记录删除成功!');window.location.href='indexs.php?lmbs=查看邮件发送记录'</script>";
}
예제 #7
0
파일: conn.php 프로젝트: noikiy/web
<?php

$conn = new com("adodb.connection");
$connstr = "driver={microsoft access driver (*.mdb)}; dbq=" . realpath("data/db_mail_shortnote.mdb");
$conn->open($connstr);
예제 #8
0
파일: select.php 프로젝트: noikiy/web
</table>
<table width="167" border="0" cellpadding="0" cellspacing="0" background="images/bg_34.gif" id="cydy"
			  style="display:none"
			  <?php 
if (!($_GET[ides] == '$fields->value')) {
    ?>
			  <?php 
}
?>
  
			  >
               
       <?php 
$sqls = "select * from tb_note";
$res = new com("adodb.recordset");
$res->open($sqls, $conn, 1, 1);
while (!$res->eof) {
    $fields = $res->fields(note_id);
    ?>
       <tr> <td width="42" height="24" align="right"><img src="images/bg_19.gif" width="20" height="19"></td>
        <td width="122">
	<a href="che3.php?ides=<?php 
    $fields = $res->fields(note_id);
    echo $fields->value;
    ?>
"><?php 
    $fields = $res->fields(note_content);
    echo $fields->value;
    ?>
</a>          </td>
  </tr><?php