![ישן](https://static.fresh.co.il/images/vBulletin/statusicon/post_old.gif)
07-08-2006, 14:53
|
|
|
חבר מתאריך: 26.06.05
הודעות: 36
|
|
בעיה אם אוביקט ורכיבי ADODB
אוקי יש לי קלאסס טיפול של ADODB
הקוד נמצא פה הבעיה שלי היא כזאת
יש לי קובץ אשר מעלה את הקובץ הנ"ל
קוד PHP:
<? if (!defined("Site_Path")) { define("Site_Path",dirname(__FILE__)); } if (!defined("_ServerCrc")) { define("_ServerCrc" , md5($_SERVER['HTTP_HOST'])); } include (Site_Path."/configs/db.conf"); include (Site_Path."/libs/core/functions.inc"); include (Site_Path."/libs/core/Db.cls.inc"); include (Site_Path."/libs/Driver/adodb.inc.php"); include (Site_Path."/libs/smarty/Smarty.class.php"); $smarty = new Smarty; $smarty->template_dir = 'tpl/'; $smarty->compile_dir = 'cache/Tpls/'; $smarty->config_dir = 'configs/'; $smarty->cache_dir = 'cache/'; if (!is_a($Db)) { $Db = new DbStrc(__DbCache__); $Db->debug = true; } $not_enter = array("login" , "post"); if (!in_array($_GET['atc'],$not_enter)) { if (!$_SESSION['UserName']) { redirect_url_by("index.login"); } . . .
הבעיה שלי שאני מנסה לאמת את הנותנים באופן בסיסי
של יוזר וסיסמה
קוד PHP:
. . . $arrTab = array( TB_users ); $arrFil = array( array(TB_users , "id as id"), array(TB_users , "username as username") , array(TB_users , "password as pass") , array(TB_users , "usertype as is_admin") , array(TB_users , "loged as loged") ); $pass = md5(sha1(md5(base64_encode(bin2hex(hexdec(md5($_PO ST[password]))))))); $user = $_POST[username]; if ($pass&&$user) { echo $user; $where = TB_users .".username = '".$user."' and ".TB_users .".password = '$pass'"; $Db->genrate_Sql($arr,0,$arrFilm,$where); $recordSet = $Db->GetLnk(); if ($recordSet->RecordCount()!=0) { $err = $user; $_SESSION['UserName'] = $user; redirect_url_by("index"); } $recordSet->Close(); } . . .
הבעיה שהוא $recordSet = $Db->GetLnk(); לא מחזיר לי שום רקורד או לחליפין
ניסיתי לבדוק שזה בכלל מבצע משהוא והוא לא בדיוק הראה שום נותנים
$err = $Db->GetSql();
תודה לעוזרים
בבקשה רק מי שמבין ב ADODB או מי שמבין ב CLASS
תודה
נערך לאחרונה ע"י fastwings12 בתאריך 07-08-2006 בשעה 14:56.
|