Exemplo n.º 1
0
session_start();
if (!isset($_SESSION["confirm"])) {
    header("Location: ./6login.php");
    exit;
}
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
    echo "編集してください。";
    ?>
 <form name="com" action="6edit.php" method="post">
    商品名:<input type="text" name="after" value="<?php 
    echo $_GET["name"];
    ?>
"><br>
           <input type="hidden" name="before" value="<?php 
    echo $_GET['name'];
    ?>
">
    <input type="submit" value="送信">
</form>
 <?php 
} else {
    require_once "6function.php";
    $com = new com();
    $com->editname($_POST["before"], $_POST["after"]);
    echo "編集しました。<br>";
}
?>
<br>
<a href="./6signin.php">戻る</a>
    </body>
</html>
Exemplo n.º 2
0
//检查数据库是否存在
$pjblog_data = "pblog2.mdb";
if (!file_exists($pjblog_data)) {
    echo "Pjblog的Access数据库不存在,pjblog数据文件默认放在blogDB目录中的" . $pjblog_data . "文件,请把它复制到tools下,并保证文件名也要一致!";
    exit;
}
if (!class_exists("com")) {
    echo "PHP需要支持COM。建议请在本地电脑安装PHP5,可以安装一个傻瓜式的xampp套件,它集成了php5,apache,mysql非常方便。";
    exit;
}
include "../include/common.php";
echo "<font size=\"4\">转换pjblog的Access数据库到F2bLog,<br>正在运行,请不要关闭网页!</font><br /><br />";
$conn = new com("ADODB.Connection", NULL, CP_UTF8);
$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath($pjblog_data);
$conn->Open($connstr);
$rs = new com("ADODB.RecordSet", NULL, CP_UTF8);
//转换类别
echo "正在转换类别 ...";
ob_flush();
flush();
$i = 0;
$insert_value = array();
$arr_fields = array("cate_ID" => "id", "cate_Name" => "name", "cate_Order" => "orderNo", "cate_Intro" => "cateTitle", "cate_count" => "cateCount", "cate_Secret" => "isHidden");
$rs->Open("select * from blog_Category", $conn, 1, 1);
while (!$rs->eof) {
    foreach ($arr_fields as $key => $value) {
        $f = $rs->Fields($key);
        $insert_value[$i][$value] = convert_quote($f->value);
    }
    $i++;
    $rs->MoveNext();
Exemplo n.º 3
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);
}
Exemplo n.º 4
0
</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 {
Exemplo n.º 5
0
Arquivo: conn.php Projeto: noikiy/web
<?php

$conn = new com("adodb.connection");
$connstr = "driver={microsoft access driver (*.mdb)}; dbq=" . realpath("data/db_mail_shortnote.mdb");
$conn->open($connstr);
Exemplo n.º 6
0
Arquivo: index.php Projeto: 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秒钟转入主页,请稍等......";
         }
     }
 }
Exemplo n.º 7
0
            mkdir($attdir);
        }
        //$uploadfile=$attdir.$t.".".$tmp_type;
        //$uploadfile = $attdir.iconv("UTF-8","GB2312",$f_name );
        $uploadfile = $attdir . $f_name;
        if (is_file($uploadfile) && file_exists($uploadfile)) {
            $fop->delete_file($uploadfile);
        }
        $fop->checkDir($uploadfile);
        if ($up_error != "yes" && move_uploaded_file($_FILES[$f_input]['tmp_name'][$key], $uploadfile)) {
            //$_msg=$_msg.$f_name.'上传成功\n';
            $_msg = "";
            //如果是zip rar文件的就解压 通过系统doc命令解压
            if ($tmp_type == 'rar' || $tmp_type == 'zip') {
                if (is_file($uploadfile) && file_exists($uploadfile)) {
                    $obj = new com("wscript.shell");
                    $winrar = "winrar x " . $attdir . $f_name . "  " . SYS_PATH_PHOTOS . '\\temp' . DS . (empty($_SESSION['adminname']) ? '\\admin' : $_SESSION['adminname']);
                    $obj->run($winrar, 1, true);
                    $fop->delete_file($uploadfile);
                }
                /*Import::zip()->unZip($attdir.$f_name,$attdir);
                		if(is_file($uploadfile)&&file_exists($uploadfile)) $fop->delete_file($uploadfile);*/
            }
        } else {
            $_msg = $_msg . $f_name . '上传失败\\n';
        }
    }
    //$ac = explode('.',$f_name);
    //$rts[$t] = $ac[0];
    //unset($ac);
}
Exemplo n.º 8
0
                </tr>
</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>
Exemplo n.º 9
0
    $result = $DMC->query($search_sql = "select * from " . $DBPrefix . "members where username='******'");
    if (!$DMC->fetchArray($result)) {
        $insert_sql = "insert into " . $DBPrefix . "members(" . implode(",", $key) . ",role,nickname) values('" . implode("','", $value) . "','member','" . $value[username] . "')";
        $DMC->query($insert_sql);
    }
}
echo " 共转换了<font color=red>" . $i . "</font>条记录<br /><br />";
$rs->Close();
//关闭连接
$conn->Close();
if (!file_exists($lbs_gbbook)) {
    echo "如想转换lbs留言板,请把留言数据文件默认放在data目录下面的" . $lbs_gbbook . "文件,请把它复制到tools下,请保证文件名也要一致!<br /><br />";
} else {
    $connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath($lbs_gbbook);
    $conn->Open($connstr);
    $rs = new com("ADODB.RecordSet", NULL, CP_UTF8);
    //转换留言板
    echo "正在转换留言板 ...";
    ob_flush();
    flush();
    $i = 0;
    $insert_value = array();
    $arr_fields = array("gb_username" => "author", "gb_ip" => "ip", "gb_postTime" => "postTime", "gb_content" => "content");
    $rs->Open("select * from Guestbook", $conn, 1, 1);
    while (!$rs->eof) {
        $insert_value[$i][id] = $i + 1;
        $insert_value[$i][parent] = 0;
        foreach ($arr_fields as $key => $value) {
            $f = $rs->Fields($key);
            $field_value = convert_quote($f->value);
            if ($key == "gb_postTime") {
Exemplo n.º 10
0
<?php

session_start();
include "conn/conn.php";
$sqls = "select * from tb_user where username='******' and userpwd='" . $_POST[pwd] . "'";
$res = new com("adodb.recordset");
$res->open($sqls, $conn, 1, 1);
if (!$res->eof) {
    $sqls = "update tb_user set userpwd='" . $_POST[password] . "'";
    $rs = new com("adodb.recordset");
    $rs->open($sqls, $conn, 1, 1);
    if (!$res->eof) {
        echo "<script>alert('密码更新成功!');history.back();</script>";
    } else {
        echo "<script>alert('密码更新失败!');history.back();</script>";
    }
} else {
    echo "<script>alert('您输入的密码不正确!');history.back();</script>";
}
Exemplo n.º 11
0
    <body>
    <div class="container">
<ul>
<li><a href="./6index.php">商品登録</a></li>
<li><a href="./6signin.php">リスト</a></li>
<li><a href="./6logout.php">ログアウト</a></li>
</ul>
</div>
        <?php 
require_once "6function.php";
session_start();
if (!isset($_SESSION["confirm"])) {
    header("Location: ./6login.php");
    exit;
}
$com = new com();
$result = $com->displayname();
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    $com->setname($_POST["name"]);
    echo "登録完了しました";
}
?>


<h5>登録した商品名</h5>
        <ul class="list-group">
        <?php 
foreach ($result as $item) {
    ?>
            <li class="list-item-group">
                <?php 
Exemplo n.º 12
0
</head>

<body>
<table width="97%" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#EBEBEB">
  <tr>
    <td height="24" align="center" bgcolor="#E9F7FD"><span class="STYLE1">姓名</span></td>
    <td align="center" bgcolor="#E9F7FD"><span class="STYLE1">电话</span></td>
    <td align="center" bgcolor="#E9F7FD"><span class="STYLE1">邮箱</span></td>
    <td align="center" bgcolor="#E9F7FD"><span class="STYLE1">生日</span></td>
    <td align="center" bgcolor="#E9F7FD"><span class="STYLE1">地址</span></td>
    <td align="center" bgcolor="#E9F7FD"><a href="#" class="STYLE1" onClick="MM_openBrWindow('insert_customer.php','','toolbar=yes,width=440,height=219')">添加客户</a></td>
  </tr>
    <?php 
include "conn/conn.php";
$sql = "select * from tb_customer";
$res = new com("adodb.recordset");
$res->open($sql, $conn, 3, 3);
$res->pagesize = 10;
if (trim(intval($_GET[page])) == "" || intval($_GET[page]) > $res->pagecount || intval($_GET[page]) <= 0) {
    $page = 1;
} else {
    $page = intval($_GET[page]);
}
if ($res->eof || $res->bof) {
    ?>
	<tr>
      <td height="20" colspan="6" bgcolor="#F8F8F8"><div align="center" class="STYLE1">没有信息!</div></td>
  </tr>
	
	<?php 
} else {
Exemplo n.º 13
0
$dir = $Surl.$Burl;  //上传的目录
// $dir = getcwd() 获取当前目录  $Surl.$Burl指定目录
if($_POST["sub"]){//判断点击了提交按钮

 $nname = $_FILES["upfiles"]["name"];//获取上传的文件名称
 $tname = $_FILES["upfiles"]["tmp_name"];//获取上传文件的临时文件名  $_FILES["upfiles"]["tmp_name"]
 
 $fiearr=explode(".",$nname);       //将原文件名分成数组
 $key=count($fiearr)-1;                //计算出最后一个扩展名的主键
 $fie_extend=$fiearr[$key];             //列出上传文件的扩展名
 $fie_extend=strtolower($fie_extend);  //将扩展名统一为小写
 
 if($fie_extend=="zip"||$fie_extend=="rar"||$fie_extend=="7z"||$fie_extend=="iso"){  
 	 $path=$Surl.$Burl.$nname;//定义上传目录
 	 move_uploaded_file($tname,$path);//移动上传文件,在这之前其实文件已经上传成功!此处作一个命名处理而已!此处还是以原来的名称命名文件!
 $obj= new com("wscript.shell");//实例化COM组件
 $obj->run("winrar x $dir\\".$nname." ".$dir , 0 ,true);//执行RUN方法来执行winrar命令来解压文件!
 //unlink($nname);//此命令为删除文件,意思上传后删除原来上传的压缩文件,只留解压后的文件夹!

 }else{
 echo "对不起,上传格式必须是压缩包格式文件,请调整格式后重新上传,谢谢 !";
 }
 


echo  "<script>alert('".$Burl.$nname."上传成功');</script>";
// 获取网站根目录
//echo $Surl.$Burl."<br>";
//echo "winrar x $dir\\$nname $dir";

 echo "<script>parent.location.reload();</script>";
Exemplo n.º 14
0
?>
</span></td>
      </tr>
      <tr>
        <td valign="top">  <form name="form1" method="post" action="sendmail_select_ok.php">
          <table width="452" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr align="center" bgcolor="#BBE323">
              <td  height="25" colspan="2" bgcolor="#FFFFFF">邮件主题</td>
              <td width="114" bgcolor="#FFFFFF">发件人</td>
              <td width="115" bgcolor="#FFFFFF">发件时间</td>
              <td width="109" bgcolor="#FFFFFF">收件人</td>
            </tr>
            <?php 
include "conn/conn.php";
$sql = "select * from tb_mail";
$rs = new com("adodb.recordset");
$rs->open($sql, $conn, 3, 1);
$rs->pagesize = 10;
if (trim(intval($_GET[page])) == "" || intval($_GET[page]) > $rs->pagecount || intval($_GET[page]) <= 0) {
    $page = 1;
} else {
    $page = intval($_GET[page]);
}
if ($rs->eof || $rs->bof) {
    ?>
            <tr>
              <td height="20" colspan="5" bgcolor="#FFFFFF"><div align="center">没有信息!</div></td>
            </tr>
            <?php 
} else {
    $res->absolutepage = $page;
Exemplo n.º 15
0
<!DOCTYPE html>
<html lang="ja">
    <head>
        <meta charset="shift_jis">
    </head>
    <body>
<?php 
require_once "06kadai6.php";
$com = new com();
$com->setname($_POST["name"]);
echo "登録完了しました";
//*は全カラムを抽出
$sql = "select name from com";
$stmt = $pdo->prepare($sql);
$stmt->execute();
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
?>
<h5>登録した商品名</h5>
   <ui class="list-group">
       <?php 
foreach ($result as $item) {
    ?>
       <li class="list-item-group">
          <?php 
    echo $item["name"];
    ?>
           <a href="./edit.php">[編集]</a>
           <a href="./delete.php">[削除]</a>
       </li>
      <?php 
}
Exemplo n.º 16
0
}
$array = explode("@", $_SESSION[producelist]);
$arrayquatity = explode("@", $_SESSION[quatity]);
while (list($name, $value) = each($_POST)) {
    for ($i = 0; $i < count($array) - 1; $i++) {
        if ($array[$i] == $name) {
            $arrayquatity[$i] = $value;
        }
    }
}
$_SESSION[quatity] = implode("@", $arrayquatity);
for ($i = 0; $i < count($array) - 1; $i++) {
    $id = $array[$i];
    if ($id != "") {
        $sql = 'select * from tb_colleague where colleague_id=' . $id . '';
        $res = new com("adodb.recordset");
        $res->open($sql, $conn, 3, 1);
        $fields = $res->fields(colleague_mail);
        echo $fields->value;
    }
}
?>
</textarea></td>
       <td width="86" height="33" class="STYLE2"><a href="delete_mail.php">删除邮箱</a></td>
     </tr>
     <tr>
       <td><span class="STYLE2">注意:群发使用*分隔邮箱地址</span></td>
     </tr>
   </table></td>
                      </tr>
                      <tr>
Exemplo n.º 17
0
<title>无标题文档</title>
</head>

<body>
<table width="97%" height="92" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#EBEBEB">
  <tr>
    <td height="20" align="center" valign="middle" bgcolor="#E9F7FD"><span class="STYLE1">IP</span></td>
    <td align="center" valign="middle" bgcolor="#E9F7FD"><span class="STYLE1">发信号码</span></td>
    <td align="center" valign="middle" bgcolor="#E9F7FD"><span class="STYLE1">收信号码</span></td>
    <td align="center" valign="middle" bgcolor="#E9F7FD"><span class="STYLE1">短信内容</span></td>
    <td align="center" valign="middle" bgcolor="#E9F7FD"><span class="STYLE1">发送时间</span></td>
    <td align="center" valign="middle" bgcolor="#E9F7FD"><span class="STYLE1">操作</span></td>
  </tr>
   <?php 
$sqls = "select * from tb_short";
$res = new com("adodb.recordset");
$res->open($sqls, $conn, 1, 1);
$res->pagesize = 5;
if (trim(intval($_GET[page])) == "" || intval($_GET[page]) > $res->pagecount || intval($_GET[page]) <= 0) {
    $page = 1;
} else {
    $page = intval($_GET[page]);
}
if ($res->eof || $res->bof) {
    ?>
	<tr>
        <td height="20" colspan="6" bgcolor="#F8F8F8"><div align="center" class="STYLE1">暂无短信发送记录!</div></td>
  </tr>
	
	<?php 
} else {
Exemplo n.º 18
0
<?php

include "conn/conn.php";
if ($colleague == true) {
    $sql = 'delete from tb_colleague where colleague_id=' . $colleague . '';
    $rs = new com("adodb.recordset");
    $rs->open($sql, $conn, 3, 3);
    echo "<script>alert('同事信息删除成功!');window.location.href='indexs.php?lmbs={$_GET['lmbs']}&lmlb=同事信息管理';</script>";
}
if ($customer == true) {
    $sql = 'delete from tb_customer where customer_id=' . $customer . '';
    $res = new com("adodb.recordset");
    $res->open($sql, $conn, 3, 3);
    echo "<script>alert('客户信息删除成功!');window.location.href='indexs.php?lmbs={$_GET['lmbs']}&lmlb=客户信息管理';</script>";
}
if ($note == true) {
    $sql = 'delete from tb_note where note_id=' . $note . '';
    $ress = new com("adodb.recordset");
    $ress->open($sql, $conn, 3, 3);
    echo "<script>alert('短语信息删除成功!');window.location.href='indexs.php?lmbs={$_GET['lmbs']}&lmlb=常用短语管理';</script>";
}
Exemplo n.º 19
0
<?php 
$arrayes = explode("@", $_SESSION[producelistes]);
$arrayquatityes = explode("@", $_SESSION[quatityes]);
while (list($names, $values) = each($_POST)) {
    for ($i = 0; $i < count($arrayes) - 1; $i++) {
        if ($arrayes[$i] == $names) {
            $arrayquatityes[$i] = $values;
        }
    }
}
$_SESSION[quatityes] = implode("@", $arrayquatityes);
for ($i = 0; $i < count($arrayes) - 1; $i++) {
    $ides = $arrayes[$i];
    if ($ides != "") {
        $sql = 'select * from tb_note where note_id=' . $ides . '';
        $rs = new com("adodb.recordset");
        $rs->open($sql, $conn, 3, 3);
        $fields = $rs->fields(note_content);
        echo $fields->value;
    }
}
?>
</textarea>
	    </div></td>
	  </tr>  
	  <tr>
        <td width="306" height="20"><div align="center" class="STYLE1">注册手机号:</div></td>
        <td width="639" height="20"><div align="left"><input name="regtel" type="text" class="inputcss" id="regtel" size="30" >
        </div></td>
      </tr>
	  <tr>
Exemplo n.º 20
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>";
}
Exemplo n.º 21
0
<!DOCTYPE html>
<html lang="ja">
    <head>
        <meta charset="shift_jis">
    </head>
    <body>
<?php 
//商品削除機能
session_start();
if (!isset($_SESSION["confirm"])) {
    header("Location: ./6login.php");
    exit;
}
require_once "6function.php";
$name = $_GET["name"];
$com = new com();
$com->deletename($name);
echo "削除を完了しました。<br><br>";
?>
<a href="./6signin.php">編集一覧</a>
    </body>
</html>
Exemplo n.º 22
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>";
}
Exemplo n.º 23
0
</head>

<body>
<table width="97%" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#EBEBEB">
  <tr>
    <td width="15%" height="20" align="center" bgcolor="#E9F7FD"><span class="STYLE1">姓名</span></td>
    <td width="15%" align="center" bgcolor="#E9F7FD"><span class="STYLE1">电话</span></td>
    <td width="15%" align="center" bgcolor="#E9F7FD"><span class="STYLE1">邮箱</span></td>
    <td width="15%" align="center" bgcolor="#E9F7FD"><span class="STYLE1">生日</span></td>
    <td width="22%" align="center" bgcolor="#E9F7FD"><span class="STYLE1">地址</span></td>
    <td width="18%" align="center" bgcolor="#E9F7FD"><a href="#" class="STYLE1" onClick="MM_openBrWindow('insert_colleague.php','','toolbar=yes,width=440,height=219')">添加同事</a></td>
  </tr>
    <?php 
include "conn/conn.php";
$sql = "select * from tb_colleague";
$rs = new com("adodb.recordset");
$rs->open($sql, $conn, 3, 3);
$rs->pagesize = 10;
if (trim(intval($_GET[page])) == "" || intval($_GET[page]) > $rs->pagecount || intval($_GET[page]) <= 0) {
    $page = 1;
} else {
    $page = intval($_GET[page]);
}
if ($rs->eof || $rs->bof) {
    ?>
	<tr>
        <td height="20" colspan="6" align="center" bgcolor="#F8F8F8"><div align="center" class="STYLE1">没有信息!</div></td>
        </tr>
	
	<?php 
} else {
Exemplo n.º 24
0
 /**
  * Get a process by process ID
  *
  * @param   int pid process id
  * @param   string exe
  * @return  lang.Process
  * @throws  lang.IllegalStateException
  */
 public static function getProcessById($pid, $exe = NULL)
 {
     $self = new self();
     $self->status = array('pid' => $pid, 'running' => TRUE, 'exe' => $exe, 'command' => '', 'arguments' => NULL, 'owner' => FALSE);
     // Determine executable and command line:
     // * On Windows, use Windows Management Instrumentation API - see
     //   http://en.wikipedia.org/wiki/Windows_Management_Instrumentation
     //
     // * On systems with a /proc filesystem, use information from /proc/self
     //   See http://en.wikipedia.org/wiki/Procfs. Before relying on it,
     //   also check that /proc is not just an empty directory; this assumes
     //   that process 1 always exists - which usually is `init`.
     //
     // * Fall back to use the PHP_BINARY (#54514) constant and finally the "_"
     //   environment variable for the executable and /bin/ps to retrieve the
     //   command line (please note unfortunately any quote signs have been
     //   lost and it can thus be only used for display purposes)
     if (strncasecmp(PHP_OS, 'Win', 3) === 0) {
         try {
             $c = new com('winmgmts:');
             $p = $c->get('//./root/cimv2:Win32_Process.Handle="' . $pid . '"');
             $self->status['exe'] = $p->executablePath;
             $self->status['command'] = $p->commandLine;
         } catch (Exception $e) {
             throw new IllegalStateException('Cannot find executable: ' . $e->getMessage());
         }
     } else {
         if (is_dir('/proc/1')) {
             if (!file_exists($proc = '/proc/' . $pid)) {
                 throw new IllegalStateException('Cannot find executable in /proc');
             }
             if (defined('PHP_BINARY')) {
                 $self->status['exe'] = PHP_BINARY;
             } else {
                 do {
                     foreach (array('/exe', '/file') as $alt) {
                         if (!file_exists($proc . $alt)) {
                             continue;
                         }
                         $self->status['exe'] = readlink($proc . $alt);
                         break 2;
                     }
                     throw new IllegalStateException('Cannot find executable in ' . $proc);
                 } while (0);
             }
             $self->status['command'] = strtr(file_get_contents($proc . '/cmdline'), "", ' ');
         } else {
             try {
                 if (defined('PHP_BINARY')) {
                     $self->status['exe'] = PHP_BINARY;
                 } else {
                     if ($exe) {
                         $self->status['exe'] = self::resolve($exe);
                     } else {
                         if ($_ = getenv('_')) {
                             $self->status['exe'] = self::resolve($_);
                         } else {
                             throw new IllegalStateException('Cannot find executable');
                         }
                     }
                 }
                 $self->status['command'] = exec('ps -ww -p ' . $pid . ' -ocommand 2>&1', $out, $exit);
                 if (0 !== $exit) {
                     throw new IllegalStateException('Cannot find executable: ' . implode('', $out));
                 }
             } catch (IOException $e) {
                 throw new IllegalStateException($e->getMessage());
             }
         }
     }
     $self->in = xp::null();
     $self->out = xp::null();
     $self->err = xp::null();
     return $self;
 }
Exemplo n.º 25
0
                </tr>
</table>
<table width="167" border="0" cellpadding="0" cellspacing="0" background="images/bg_34.gif" id="ts"
			  style="display:none"
			  <?php 
if (!($_GET[id] == '$fields->value')) {
    ?>
			  <?php 
}
?>
  
			  >
               
    <?php 
$sql = "select * from tb_colleague";
$rs = new com("adodb.recordset");
$rs->open($sql, $conn, 3, 1);
while (!$rs->eof) {
    $fields = $rs->fields(colleague_id);
    ?>
    <tr>
      <td width="42" align="right"><img src="images/bg_19.gif" width="20" height="19"></td> 
        <td height="24">&nbsp;
		
<a href="mail_che6.php?id=<?php 
    $fields = $rs->fields(colleague_id);
    echo $fields->value;
    ?>
"><?php 
    $fields = $rs->fields(colleague_name);
    echo $fields->value;
Exemplo n.º 26
0
Arquivo: send.php Projeto: 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>";
        }
    }
}
Exemplo n.º 27
0
$zblog_data = "zblog.mdb";
//zblog数据文件
if (!file_exists($zblog_data)) {
    echo "zblog的Access数据库不存在,默认数据库文件放在data目录下面的" . $zblog_data . "文件,请把它复制到tools下,请保证文件名也要一致!";
    exit;
}
if (!class_exists("com")) {
    echo "PHP需要支持COM。建议请在本地电脑安装PHP5,可以安装一个傻瓜式的xampp套件,它集成了php5,apache,mysql非常方便。";
    exit;
}
include "../include/common.php";
echo "<font size=\"4\">转换zblog的Access数据库到F2bLog,<br>正在运行,请不要关闭网页!</font><br /><br />";
$conn = new com("ADODB.Connection", NULL, CP_UTF8);
$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath($zblog_data);
$conn->Open($connstr);
$rs = new com("ADODB.RecordSet", NULL, CP_UTF8);
//转换类别
echo "正在转换类别 ...";
ob_flush();
flush();
$i = 0;
$insert_value = array();
$arr_fields = array("cate_ID" => "id", "cate_Name" => "name", "cate_Order" => "orderNo", "cate_Intro" => "cateTitle", "cate_Count" => "cateCount");
$rs->Open("select * from blog_Category", $conn, 1, 1);
while (!$rs->eof) {
    foreach ($arr_fields as $key => $value) {
        $f = $rs->Fields($key);
        $insert_value[$i][$value] = convert_quote($f->value);
    }
    $i++;
    $rs->MoveNext();