Esempio n. 1
0
<?php

require path . 'common/smarty.php';
require path . 'common/PasswordClass.php';
$id = 101;
$name = "allsmy";
$new_password = "******";
$pwdc = new PasswordClass();
$rs = $pwdc->addPassword($id, $name, $new_password);
//$rs = $pwdc->deletePassword(2);
//$rs = $pwdc->modifyPassword($id,'abcderfg33');
//$rs = $pwdc->selectPassword($id);
if (true) {
    //$smarty->assign('pswdadd','查询操作成功'.$rs[2]);
    $smarty->assign('pswdadd', '操作成功');
    $smarty->display('passwordadd.tpl');
} else {
    $smarty->assign('pswdadd', '操作失败');
    $smarty->display('passwordadd.tpl');
}
Esempio n. 2
0
 function __construct($db)
 {
     parent::__construct();
     $this->_db = $db;
 }