示例#1
0
文件: t.php 项目: LPCH1994/project
<?php

include "xtemplate.class.php";
include "model.php";
$a = new sanpham();
$p = $a->ngay();
print_r($p);
示例#2
0
     }
     $content = $k->text("main");
     break;
 case 'hd':
     if (isset($_GET['save']) != true) {
         $hd = new XTemplate("hoadon.php");
         $hd->parse("main");
         $content = $hd->text("main");
     } else {
         $name = $_POST['name'];
         $email = $_POST['email'];
         $phone = $_POST['phone'];
         $cmt = $_POST['cmtnd'];
         $address = $_POST['address'];
         $p = $a->xl();
         $date = $a->ngay();
         $query = "INSERT INTO hoadon VALUES ('','{$name}','{$email}','{$phone}','{$cmt}','{$address}','','{$p}','','{$date}')";
         mysql_query($query) or die(mysql_error());
         $ht = new XTemplate("ht.php");
         $ht->parse("main");
         $content = $ht->text("main");
     }
     break;
 case 'xoa':
     $query = "SELECT * FROM sanpham";
     $result = mysql_query($query) or die(mysql_error());
     while ($row = mysql_fetch_array($result)) {
         if (isset($_SESSION[".{$row['id']}."]) == true) {
             unset($_SESSION[".{$row['id']}."]);
         }
     }
示例#3
0
文件: t2.php 项目: LPCH1994/project
<?php

include "model.php";
$a = new sanpham();
$d = $a->ngay();
$c = 24 / 12 / 2014;
if ($c < $d) {
    echo $d;
}