النتائج 1 إلى 15 من 15

الموضوع: ممكن مساعدة بخصوص صلاحيات الاعضاء

  1. #1
    عضو نشيط جدا
    تاريخ التسجيل
    Nov 2000
    المشاركات
    504

    ممكن مساعدة بخصوص صلاحيات الاعضاء



    السلام عليكم ورحمة الله وبركاته

    حالياً جالس اشتغل على برنامج صغير ولاكن من المهام هو اعطاء صلحيات لكل عضو

    مثلا

    التعديل و الحذف لعضو معين
    و الاضافه لعضو

    صراحه الفكره ماهي جايه في بالي ابداً ولا قد تطرقت لها او اني قريت عنها شي

    فقط ما ارغبه هو الفكره طريقة الصلاحيات لكل عضو


    بنتظاركم







  2. #2
    عضو جديد
    تاريخ التسجيل
    Jan 2008
    المشاركات
    29


    السلام عليكم ورحمة الله وبركاته

    حالياً جالس اشتغل على برنامج صغير ولاكن من المهام هو اعطاء صلحيات لكل عضو

    مثلا

    التعديل و الحذف لعضو معين
    و الاضافه لعضو

    صراحه الفكره ماهي جايه في بالي ابداً ولا قد تطرقت لها او اني قريت عنها شي

    فقط ما ارغبه هو الفكره طريقة الصلاحيات لكل عضو


    بنتظاركم
    سوي جدول باسم group
    يكون متكون من الحقول التالية
    group_id
    group_del حذف مواضيع مثلا
    group_writing كتابة مواضيع مثلاً
    الخ ..

    وفي جدول الاعضاء سوي حقل باسم
    group_id :1power:
    والباقي اكيد انت بتعرفه






  3. #3
    عضو نشيط جدا
    تاريخ التسجيل
    Jan 2008
    المشاركات
    392


    اخوي GlobTrax

    انا سويت قاعدة بيانات بشكل هذا
    كود:
    -- phpMyAdmin SQL Dump
    -- version 2.9.1.1
    -- http://www.phpmyadmin.net
    -- 
    -- قاعدة البيانات: `AD`
    -- 
    
    -- --------------------------------------------------------
    
    -- 
    -- بنية الجدول `registered_members`
    -- 
    
    CREATE TABLE `registered_members` (
      `id` int(4) NOT NULL auto_increment,
      `username` varchar(65) NOT NULL,
      `password` varchar(65) NOT NULL,
      `level` varchar(65) NOT NULL,
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=cp1256 AUTO_INCREMENT=4;
    
    --
    بحيث ان حقل level اقدر احط المستوى فيه اي من 1 الى 5

    بس المشكلة عند عرض الصفحة

    كيف اعطي صلاحيات على هذه الصفحة

    بحيث اذا كان الرقم 1 او 2 او 3 في حقل level لايستطيع الدخول

    اما اذا كان 4 او 5 يستطيع الدخول

    هذه هي الصفحة
    كود:
    <?
    session_start();
    if(!session_is_registered(myusername)){
    header("location:index.php");
    }
    ?>
    
    <html>
    <head>
    <title>Faleh S Al-Harthi</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script language="JavaScript" fptype="dynamicanimation">
    <!--
    function dynAnimation() {}
    function clickSwapImg() {}
    //-->
    </script>
    <script language="JavaScript1.2" fptype="dynamicanimation" src="animate.js">
    </script>
    </head>
    <body bgcolor="#93CFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="dynAnimation()" language="Javascript1.2">
    
    <div align="center">
    <table id="Table_01" width="768" height="1001" border="0" cellpadding="0" cellspacing="0">
    	<tr>
    		<td colspan="14">
    			<img src="images/faleh_01.jpg" width="767" height="7" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="7" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="2" rowspan="2">
    			<img src="images/faleh_02.jpg" width="26" height="101" alt=""></td>
    		<td>
    			<a href="logout.php">
    			<img border="0" src="images/faleh_03.jpg" width="32" height="46"></a></td>
    		<td rowspan="2">
    			<img src="images/faleh_04.jpg" width="35" height="101" alt=""></td>
    		<td>
    			<a href="Contact.php">
    			<img border="0" src="images/faleh_05.jpg" width="31" height="46"></a></td>
    		<td rowspan="2">
    			<img src="images/faleh_06.jpg" width="29" height="101" alt=""></td>
    		<td>
    			<a href="stc.php">
    			<img border="0" src="images/faleh_07.jpg" width="62" height="46"></a></td>
    		<td colspan="7" rowspan="2">
    			<img src="images/faleh_08.jpg" width="552" height="101" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="46" alt=""></td>
    	</tr>
    	<tr>
    		<td>
    			<img src="images/faleh_09.jpg" width="32" height="55" alt=""></td>
    		<td>
    			<img src="images/faleh_10.jpg" width="31" height="55" alt=""></td>
    		<td>
    			<img src="images/faleh_11.jpg" width="62" height="55" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="55" alt=""></td>
    	</tr>
    	<tr>
    		<td rowspan="2">
    			<img src="images/faleh_12.jpg" width="14" height="90" alt=""></td>
    		<td colspan="7">
    			<iframe name="I1" src="wellcome.php" height="69" width="312" border="0" frameborder="0">
    			لا يدعم المستعرض الذي تستخدمه الإطارات المضمنة أو تمت تهيئته حالياً حتى لا يدعم الإطارات المضمنة.
    			</iframe></td>
    		<td colspan="6" rowspan="2">
    			<img src="images/faleh_14.jpg" width="441" height="90" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="69" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="7">
    			<img src="images/faleh_15.jpg" width="312" height="21" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="21" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="9" rowspan="19">
    			<iframe name="I2" src="staff_reviewdatast.php" height="746" width="535" border="0" frameborder="0">
    			لا يدعم المستعرض الذي تستخدمه الإطارات المضمنة أو تمت تهيئته حالياً حتى لا يدعم الإطارات المضمنة.
    			</iframe></td>
    		<td colspan="5">
    			<img src="images/faleh_17.jpg" width="232" height="48" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="48" alt=""></td>
    	</tr>
    	<tr>
    		<td rowspan="19">
    			<img src="images/faleh_18.jpg" width="5" height="702" alt=""></td>
    		<td colspan="3">
    			<a href="addstaff.php" onmouseover="var img=document['fpAnimswapImgFP1'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsrc:img.getAttribute?img.getAttribute('lowsrc'):img.src;" onmouseout="document['fpAnimswapImgFP1'].src=document['fpAnimswapImgFP1'].imgRolln">
    			<img border="0" src="images/faleh_19.jpg" width="220" height="32" id="fpAnimswapImgFP1" name="fpAnimswapImgFP1" dynamicanimation="fpAnimswapImgFP1" lowsrc="images/faleh2_19.jpg"></a></td>
    		<td rowspan="19">
    			<img src="images/faleh_20.jpg" width="7" height="702" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="32" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="3">
    			<img src="images/faleh_21.jpg" width="220" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="1" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="3">
    			<a href="dataamendment.php" onmouseover="var img=document['fpAnimswapImgFP2'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsrc:img.getAttribute?img.getAttribute('lowsrc'):img.src;" onmouseout="document['fpAnimswapImgFP2'].src=document['fpAnimswapImgFP2'].imgRolln">
    			<img border="0" src="images/faleh_22.jpg" width="220" height="28" id="fpAnimswapImgFP2" name="fpAnimswapImgFP2" dynamicanimation="fpAnimswapImgFP2" lowsrc="images/faleh2_22.jpg"></a></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="28" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="3">
    			<img src="images/faleh_23.jpg" width="220" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="1" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="3">
    			<a href="reviewdata.php" onmouseover="var img=document['fpAnimswapImgFP3'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsrc:img.getAttribute?img.getAttribute('lowsrc'):img.src;" onmouseout="document['fpAnimswapImgFP3'].src=document['fpAnimswapImgFP3'].imgRolln">
    			<img border="0" src="images/faleh_24.jpg" width="220" height="28" id="fpAnimswapImgFP3" name="fpAnimswapImgFP3" dynamicanimation="fpAnimswapImgFP3" lowsrc="images/faleh2_24.jpg"></a></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="28" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="3">
    			<img src="images/faleh_25.jpg" width="220" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="1" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="3">
    			<a href="leave.php" onmouseover="var img=document['fpAnimswapImgFP4'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsrc:img.getAttribute?img.getAttribute('lowsrc'):img.src;" onmouseout="document['fpAnimswapImgFP4'].src=document['fpAnimswapImgFP4'].imgRolln">
    			<img border="0" src="images/faleh_26.jpg" width="220" height="28" id="fpAnimswapImgFP4" name="fpAnimswapImgFP4" dynamicanimation="fpAnimswapImgFP4" lowsrc="images/faleh2_26.jpg"></a></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="28" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="3">
    			<img src="images/faleh_27.jpg" width="220" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="1" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="3">
    			<a href="absence.php" onmouseover="var img=document['fpAnimswapImgFP5'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsrc:img.getAttribute?img.getAttribute('lowsrc'):img.src;" onmouseout="document['fpAnimswapImgFP5'].src=document['fpAnimswapImgFP5'].imgRolln">
    			<img border="0" src="images/faleh_28.jpg" width="220" height="28" id="fpAnimswapImgFP5" name="fpAnimswapImgFP5" dynamicanimation="fpAnimswapImgFP5" lowsrc="images/faleh2_28.jpg"></a></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="28" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="3">
    			<img src="images/faleh_29.jpg" width="220" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="1" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="3">
    			<a href="delay.php" onmouseover="var img=document['fpAnimswapImgFP6'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsrc:img.getAttribute?img.getAttribute('lowsrc'):img.src;" onmouseout="document['fpAnimswapImgFP6'].src=document['fpAnimswapImgFP6'].imgRolln">
    			<img border="0" src="images/faleh_30.jpg" width="220" height="28" id="fpAnimswapImgFP6" name="fpAnimswapImgFP6" dynamicanimation="fpAnimswapImgFP6" lowsrc="images/faleh2_30.jpg"></a></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="28" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="3">
    			<img src="images/faleh_31.jpg" width="220" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="1" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="3">
    			<a href="eststaf.php" onmouseover="var img=document['fpAnimswapImgFP7'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsrc:img.getAttribute?img.getAttribute('lowsrc'):img.src;" onmouseout="document['fpAnimswapImgFP7'].src=document['fpAnimswapImgFP7'].imgRolln">
    			<img border="0" src="images/faleh_32.jpg" width="220" height="28" id="fpAnimswapImgFP7" name="fpAnimswapImgFP7" dynamicanimation="fpAnimswapImgFP7" lowsrc="images/faleh2_32.jpg"></a></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="28" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="3">
    			<img src="images/faleh_33.jpg" width="220" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="1" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="3">
    			<a href="Irregularities.php" onmouseover="var img=document['fpAnimswapImgFP8'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsrc:img.getAttribute?img.getAttribute('lowsrc'):img.src;" onmouseout="document['fpAnimswapImgFP8'].src=document['fpAnimswapImgFP8'].imgRolln">
    			<img border="0" src="images/faleh_34.jpg" width="220" height="34" id="fpAnimswapImgFP8" name="fpAnimswapImgFP8" dynamicanimation="fpAnimswapImgFP8" lowsrc="images/faleh2_34.jpg"></a></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="34" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="3">
    			<img src="images/faleh_35.jpg" width="220" height="183" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="183" alt=""></td>
    	</tr>
    	<tr>
    		<td rowspan="3">
    			<img src="images/faleh_36.jpg" width="37" height="278" alt=""></td>
    		<td>
    			<a href="admin.php">
    			<img border="0" src="images/faleh_37.jpg" width="177" height="94"></a></td>
    		<td rowspan="3">
    			<img src="images/faleh_38.jpg" width="6" height="278" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="94" alt=""></td>
    	</tr>
    	<tr>
    		<td rowspan="2">
    			<img src="images/faleh_39.jpg" width="177" height="184" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="180" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="9">
    			<img src="images/faleh_40.jpg" width="535" height="4" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="4" alt=""></td>
    	</tr>
    	<tr>
    		<td colspan="14">
    			<img src="images/faleh_41.jpg" width="767" height="52" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="1" height="52" alt=""></td>
    	</tr>
    	<tr>
    		<td>
    			<img src="images/spacer.gif" width="14" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="12" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="32" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="35" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="31" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="29" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="62" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="111" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="209" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="5" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="37" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="177" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="6" height="1" alt=""></td>
    		<td>
    			<img src="images/spacer.gif" width="7" height="1" alt=""></td>
    		<td></td>
    	</tr>
    </table>
    </div>
    
    </body>
    </html>






    التعديل الأخير تم بواسطة manindark ; 15-02-2008 الساعة 05:02 PM

  4. #4
    عضو نشيط جدا
    تاريخ التسجيل
    Nov 2000
    المشاركات
    504


    سوي جدول باسم group
    يكون متكون من الحقول التالية
    group_id
    group_del حذف مواضيع مثلا
    group_writing كتابة مواضيع مثلاً
    الخ ..

    وفي جدول الاعضاء سوي حقل باسم
    group_id :1power:
    والباقي اكيد انت بتعرفه

    شكراً لك اخوي ماقصرت على اني لم افهم شي صراحه

    لو تتكرم وتقوم بشرح الطريقه بالتفصيل يكون افضل او اقل شي اقلام نقدر نتبعها

    انا الطريقة اللي جت في بالي اني اضع حقل جديد في جدول الاعضاء واعطيه قيمه
    بعد كذا
    اسوي
    if($_SESSION['level'] == "1"){
    echo "يعرض البيانات التي مسموح بها";
    }

    انتظر ردك






  5. #5
    عضو نشيط جدا
    تاريخ التسجيل
    Jan 2008
    المشاركات
    392


    اخوي الطالب

    هذه نفس الطريقة التي اريدها وياليت تشرحها لنا


    if($_SESSION['level'] == "1"){
    echo "يعرض البيانات التي مسموح بها";
    }


    بحيث اذا كان الرقم 1 او 2 او 3 في حقل level لايستطيع الدخول

    اما اذا كان 4 او 5 يستطيع الدخول






  6. #6


    السلام عليكم

    الطريقه بكل بساطه عند تسجيل الدخول والتاكد من صحة البيانات اذا كانت صحيحه ورقم المجموعه صحيح نقوم بتسجيل الجلسه كما في المثال التالي طبعا مع تغيير المعلومات لما يناسب قاعدة البيانات الخاصه بكم


    كود PHP:
    <?
    // في البدايه نستقبل البيانات من نموذج تسجيل الدخول وتكون بالعاده الاسم والرقم السري
    $User_Name trim($_POST['User_Name']);
    $User_Pass md5($_POST['User_Pass']);

    // الان نعمل استعلام من قاعدة البيانات باسم العضو الذي قمنا بتسجيل الدخول له
    $Quser mysql_query("SELECT * FROM registered_members WHERE username='$User_Name'") or die (mysql_error() );
    while(
    $row mysql_fetch_array($Quser)){
    $user =$row[username];
    $pass =$row[password];
    $group =$row[level];
    }

    // وبعد احضار اسم المستخدم والرقم السري ورقم المجموعه من قاعدة البيانات نقوم بالتاكد من صحة البيانات وان رقم المجموعه يساوي 1 وهو رقم مجموعة الاداره
    if( ($user == $User_Name) && ($pass == $User_Pass) && ($group == 1)){

    //اذا كانت المعلومات صحيحه نسجل له الجلسه
    $_SESSION['ses_name'] = "$user";

    echo 
    "تم تسجيل الدخول بنجاح";


    // واذا كانت المعلومات خطا
    } else {

    echo 
    "عفوا تاكد من صحة المعلومات" ;
    //ونستطيع ادراج نموذج تسجيل الدخول
    }
    اتمنى ان يكون هذا ماتقصدونه





    __________________
    لا اله الا الله محمد رسول الله

    لا تقل لا أعلم بل اقرأ و تعلم

  7. #7
    عضو نشيط جدا
    تاريخ التسجيل
    Nov 2000
    المشاركات
    504


    كود PHP:
    <?
    session_start
    ();
    if(!
    session_is_registered(myusername)){
    header("location:index.php");
    }

    if(
    $_SESSION['level'] == "1"){
    echo 
    "غير مرخص لك بالدخول";
    exit;
    }else{
    ?>

    <html>
    <head>
    <title>Faleh S Al-Harthi</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script language="JavaScript" fptype="dynamicanimation">
    <!--
    function dynAnimation() {}
    function clickSwapImg() {}
    //-->
    </script>
    <script language="JavaScript1.2" fptype="dynamicanimation" src="animate.js">
    </script>
    </head>
    <body bgcolor="#93CFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="dynAnimation()" language="Javascript1.2">

    <div align="center">
    <table id="Table_01" width="768" height="1001" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td colspan="14">
                <img src="images/faleh_01.jpg" width="767" height="7" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="1" height="7" alt=""></td>
        </tr>
        <tr>
            <td colspan="2" rowspan="2">
                <img src="images/faleh_02.jpg" width="26" height="101" alt=""></td>
            <td>
                <a href="logout.php">
                <img border="0" src="images/faleh_03.jpg" width="32" height="46"></a></td>
            <td rowspan="2">
                <img src="images/faleh_04.jpg" width="35" height="101" alt=""></td>
            <td>
                <a href="Contact.php">
                <img border="0" src="images/faleh_05.jpg" width="31" height="46"></a></td>
            <td rowspan="2">
                <img src="images/faleh_06.jpg" width="29" height="101" alt=""></td>
            <td>
                <a href="stc.php">
                <img border="0" src="images/faleh_07.jpg" width="62" height="46"></a></td>
            <td colspan="7" rowspan="2">
                <img src="images/faleh_08.jpg" width="552" height="101" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="1" height="46" alt=""></td>
        </tr>
        <tr>
            <td>
                <img src="images/faleh_09.jpg" width="32" height="55" alt=""></td>
            <td>
                <img src="images/faleh_10.jpg" width="31" height="55" alt=""></td>
            <td>
                <img src="images/faleh_11.jpg" width="62" height="55" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="1" height="55" alt=""></td>
        </tr>
        <tr>
            <td rowspan="2">
                <img src="images/faleh_12.jpg" width="14" height="90" alt=""></td>
            <td colspan="7">
                <iframe name="I1" src="wellcome.php" height="69" width="312" border="0" frameborder="0">
                لا يدعم المستعرض الذي تستخدمه الإطارات المضمنة أو تمت تهيئته حالياً حتى لا يدعم الإطارات المضمنة.
                </iframe></td>
            <td colspan="6" rowspan="2">
                <img src="images/faleh_14.jpg" width="441" height="90" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="1" height="69" alt=""></td>
        </tr>
        <tr>
            <td colspan="7">
                <img src="images/faleh_15.jpg" width="312" height="21" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="1" height="21" alt=""></td>
        </tr>
        <tr>
            <td colspan="9" rowspan="19">
                <iframe name="I2" src="staff_reviewdatast.php" height="746" width="535" border="0" frameborder="0">
                لا يدعم المستعرض الذي تستخدمه الإطارات المضمنة أو تمت تهيئته حالياً حتى لا يدعم الإطارات المضمنة.
                </iframe></td>
            <td colspan="5">
                <img src="images/faleh_17.jpg" width="232" height="48" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="1" height="48" alt=""></td>
        </tr>
        <tr>
            <td rowspan="19">
                <img src="images/faleh_18.jpg" width="5" height="702" alt=""></td>
            <td colspan="3">
                <a href="addstaff.php" onmouseover="var img=document['fpAnimswapImgFP1'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsrc:img.getAttribute?img.getAttribute('lowsrc'):img.src;" onmouseout="document['fpAnimswapImgFP1'].src=document['fpAnimswapImgFP1'].imgRolln">
                <img border="0" src="images/faleh_19.jpg" width="220" height="32" id="fpAnimswapImgFP1" name="fpAnimswapImgFP1" dynamicanimation="fpAnimswapImgFP1" lowsrc="images/faleh2_19.jpg"></a></td>
            <td rowspan="19">
                <img src="images/faleh_20.jpg" width="7" height="702" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="1" height="32" alt=""></td>
        </tr>
        <tr>
            <td colspan="3">
                <img src="images/faleh_21.jpg" width="220" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="1" height="1" alt=""></td>
        </tr>
        <tr>
            <td colspan="3">
                <a href="dataamendment.php" onmouseover="var img=document['fpAnimswapImgFP2'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsrc:img.getAttribute?img.getAttribute('lowsrc'):img.src;" onmouseout="document['fpAnimswapImgFP2'].src=document['fpAnimswapImgFP2'].imgRolln">
                <img border="0" src="images/faleh_22.jpg" width="220" height="28" id="fpAnimswapImgFP2" name="fpAnimswapImgFP2" dynamicanimation="fpAnimswapImgFP2" lowsrc="images/faleh2_22.jpg"></a></td>
            <td>
                <img src="images/spacer.gif" width="1" height="28" alt=""></td>
        </tr>
        <tr>
            <td colspan="3">
                <img src="images/faleh_23.jpg" width="220" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="1" height="1" alt=""></td>
        </tr>
        <tr>
            <td colspan="3">
                <a href="reviewdata.php" onmouseover="var img=document['fpAnimswapImgFP3'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsrc:img.getAttribute?img.getAttribute('lowsrc'):img.src;" onmouseout="document['fpAnimswapImgFP3'].src=document['fpAnimswapImgFP3'].imgRolln">
                <img border="0" src="images/faleh_24.jpg" width="220" height="28" id="fpAnimswapImgFP3" name="fpAnimswapImgFP3" dynamicanimation="fpAnimswapImgFP3" lowsrc="images/faleh2_24.jpg"></a></td>
            <td>
                <img src="images/spacer.gif" width="1" height="28" alt=""></td>
        </tr>
        <tr>
            <td colspan="3">
                <img src="images/faleh_25.jpg" width="220" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="1" height="1" alt=""></td>
        </tr>
        <tr>
            <td colspan="3">
                <a href="leave.php" onmouseover="var img=document['fpAnimswapImgFP4'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsrc:img.getAttribute?img.getAttribute('lowsrc'):img.src;" onmouseout="document['fpAnimswapImgFP4'].src=document['fpAnimswapImgFP4'].imgRolln">
                <img border="0" src="images/faleh_26.jpg" width="220" height="28" id="fpAnimswapImgFP4" name="fpAnimswapImgFP4" dynamicanimation="fpAnimswapImgFP4" lowsrc="images/faleh2_26.jpg"></a></td>
            <td>
                <img src="images/spacer.gif" width="1" height="28" alt=""></td>
        </tr>
        <tr>
            <td colspan="3">
                <img src="images/faleh_27.jpg" width="220" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="1" height="1" alt=""></td>
        </tr>
        <tr>
            <td colspan="3">
                <a href="absence.php" onmouseover="var img=document['fpAnimswapImgFP5'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsrc:img.getAttribute?img.getAttribute('lowsrc'):img.src;" onmouseout="document['fpAnimswapImgFP5'].src=document['fpAnimswapImgFP5'].imgRolln">
                <img border="0" src="images/faleh_28.jpg" width="220" height="28" id="fpAnimswapImgFP5" name="fpAnimswapImgFP5" dynamicanimation="fpAnimswapImgFP5" lowsrc="images/faleh2_28.jpg"></a></td>
            <td>
                <img src="images/spacer.gif" width="1" height="28" alt=""></td>
        </tr>
        <tr>
            <td colspan="3">
                <img src="images/faleh_29.jpg" width="220" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="1" height="1" alt=""></td>
        </tr>
        <tr>
            <td colspan="3">
                <a href="delay.php" onmouseover="var img=document['fpAnimswapImgFP6'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsrc:img.getAttribute?img.getAttribute('lowsrc'):img.src;" onmouseout="document['fpAnimswapImgFP6'].src=document['fpAnimswapImgFP6'].imgRolln">
                <img border="0" src="images/faleh_30.jpg" width="220" height="28" id="fpAnimswapImgFP6" name="fpAnimswapImgFP6" dynamicanimation="fpAnimswapImgFP6" lowsrc="images/faleh2_30.jpg"></a></td>
            <td>
                <img src="images/spacer.gif" width="1" height="28" alt=""></td>
        </tr>
        <tr>
            <td colspan="3">
                <img src="images/faleh_31.jpg" width="220" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="1" height="1" alt=""></td>
        </tr>
        <tr>
            <td colspan="3">
                <a href="eststaf.php" onmouseover="var img=document['fpAnimswapImgFP7'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsrc:img.getAttribute?img.getAttribute('lowsrc'):img.src;" onmouseout="document['fpAnimswapImgFP7'].src=document['fpAnimswapImgFP7'].imgRolln">
                <img border="0" src="images/faleh_32.jpg" width="220" height="28" id="fpAnimswapImgFP7" name="fpAnimswapImgFP7" dynamicanimation="fpAnimswapImgFP7" lowsrc="images/faleh2_32.jpg"></a></td>
            <td>
                <img src="images/spacer.gif" width="1" height="28" alt=""></td>
        </tr>
        <tr>
            <td colspan="3">
                <img src="images/faleh_33.jpg" width="220" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="1" height="1" alt=""></td>
        </tr>
        <tr>
            <td colspan="3">
                <a href="Irregularities.php" onmouseover="var img=document['fpAnimswapImgFP8'];img.imgRolln=img.src;img.src=img.lowsrc?img.lowsrc:img.getAttribute?img.getAttribute('lowsrc'):img.src;" onmouseout="document['fpAnimswapImgFP8'].src=document['fpAnimswapImgFP8'].imgRolln">
                <img border="0" src="images/faleh_34.jpg" width="220" height="34" id="fpAnimswapImgFP8" name="fpAnimswapImgFP8" dynamicanimation="fpAnimswapImgFP8" lowsrc="images/faleh2_34.jpg"></a></td>
            <td>
                <img src="images/spacer.gif" width="1" height="34" alt=""></td>
        </tr>
        <tr>
            <td colspan="3">
                <img src="images/faleh_35.jpg" width="220" height="183" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="1" height="183" alt=""></td>
        </tr>
        <tr>
            <td rowspan="3">
                <img src="images/faleh_36.jpg" width="37" height="278" alt=""></td>
            <td>
                <a href="admin.php">
                <img border="0" src="images/faleh_37.jpg" width="177" height="94"></a></td>
            <td rowspan="3">
                <img src="images/faleh_38.jpg" width="6" height="278" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="1" height="94" alt=""></td>
        </tr>
        <tr>
            <td rowspan="2">
                <img src="images/faleh_39.jpg" width="177" height="184" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="1" height="180" alt=""></td>
        </tr>
        <tr>
            <td colspan="9">
                <img src="images/faleh_40.jpg" width="535" height="4" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="1" height="4" alt=""></td>
        </tr>
        <tr>
            <td colspan="14">
                <img src="images/faleh_41.jpg" width="767" height="52" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="1" height="52" alt=""></td>
        </tr>
        <tr>
            <td>
                <img src="images/spacer.gif" width="14" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="12" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="32" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="35" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="31" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="29" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="62" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="111" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="209" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="5" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="37" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="177" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="6" height="1" alt=""></td>
            <td>
                <img src="images/spacer.gif" width="7" height="1" alt=""></td>
            <td></td>
        </tr>
    </table>
    </div>

    </body>
    </html>
    <? }?>

    جرب هذي الطريقه على مافهمت انا من الشرح






  8. #8
    عضو نشيط جدا
    تاريخ التسجيل
    Nov 2000
    المشاركات
    504


    السلام عليكم

    الطريقه بكل بساطه عند تسجيل الدخول والتاكد من صحة البيانات اذا كانت صحيحه ورقم المجموعه صحيح نقوم بتسجيل الجلسه كما في المثال التالي طبعا مع تغيير المعلومات لما يناسب قاعدة البيانات الخاصه بكم


    كود PHP:
    <?
    // في البدايه نستقبل البيانات من نموذج تسجيل الدخول وتكون بالعاده الاسم والرقم السري
    $User_Name trim($_POST['User_Name']);
    $User_Pass md5($_POST['User_Pass']);

    // الان نعمل استعلام من قاعدة البيانات باسم العضو الذي قمنا بتسجيل الدخول له
    $Quser mysql_query("SELECT * FROM registered_members WHERE username='$User_Name'") or die (mysql_error() );
    while(
    $row mysql_fetch_array($Quser)){
    $user =$row[username];
    $pass =$row[password];
    $group =$row[level];
    }

    // وبعد احضار اسم المستخدم والرقم السري ورقم المجموعه من قاعدة البيانات نقوم بالتاكد من صحة البيانات وان رقم المجموعه يساوي 1 وهو رقم مجموعة الاداره
    if( ($user == $User_Name) && ($pass == $User_Pass) && ($group == 1)){

    //اذا كانت المعلومات صحيحه نسجل له الجلسه
    $_SESSION['ses_name'] = "$user";

    echo 
    "تم تسجيل الدخول بنجاح";


    // واذا كانت المعلومات خطا
    } else {

    echo 
    "عفوا تاكد من صحة المعلومات" ;
    //ونستطيع ادراج نموذج تسجيل الدخول
    }
    اتمنى ان يكون هذا ماتقصدونه

    شكراً لك






  9. #9
    عضو نشيط جدا
    تاريخ التسجيل
    Jan 2008
    المشاركات
    392


    انا عند الكود لتسجيل الدخول

    وهذا هو ملف التحقق من التسجيل
    كود:
    <?php
    ob_start();
    
    $myusername=$_POST['myusername'];
    $mypassword=$_POST['mypassword'];
    
    $encrypted_mypassword=md5($mypassword);
    
    include'configlogin.php';
    $sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$encrypted_mypassword'";
    $result=mysql_query($sql);
    
    
    // Mysql_num_row is counting table row
    $count=mysql_num_rows($result);
    // If result matched $myusername and $mypassword, table row must be 1 row
    
    if($count==1){
    // Register $myusername, $mypassword and redirect to file "login_success.php"
    session_register("myusername");
    session_register("mypassword");
    header("location:login_success.php");
    }
    else {
    echo '<META http-equiv="refresh" content="0;URL=index.php">';
    }
    ?>
    لقد سجلت جلسة اخرى في ملف التحقق ومن تسجيل الدخول


    كود:
    session_register("myusername");
    session_register("mypassword");
    session_register("level");
    وهذا الكود وضعته في باقي الصفحات و لكن الكود لا يعمل
    كود:
    <? 
    session_start(); 
    if(!session_is_registered(myusername)){ 
    header("location:index.php"); 
    } 
    
    if($_SESSION['level'] == "1"){ 
    echo "غير مرخص لك بالدخول"; 
    exit; 
    }else{ 
    ?>






    التعديل الأخير تم بواسطة manindark ; 18-02-2008 الساعة 03:50 PM

  10. #10
    عضو نشيط جدا
    تاريخ التسجيل
    Jan 2008
    المشاركات
    392


    اخواني موقعي متوقف على هذا الكود






  11. #11
    عضو نشيط جدا
    تاريخ التسجيل
    Jan 2008
    المشاركات
    392


    اخواني لو ممكن الرد






  12. #12
    عضو نشيط جدا
    تاريخ التسجيل
    Jan 2008
    المشاركات
    392


    اظن ان الكود صعب شوي






  13. #13
    عضو نشيط جدا
    تاريخ التسجيل
    Nov 2000
    المشاركات
    504


    مرحبا

    انا لم اجرب الطريقه الى الان للاسف ولاكن جربها انت ورد علينا
    استخدم هذا الكود للتسجيل الدخول

    وبعد كذا جرب الطريقة اللي شرحتها لك



    كود PHP:

    <?
    session_start
    ();

    include
    "connect.php";

    switch (
    $_GET[login]){
    case 
    a:

    $user trim($_POST['T1']);
    $pass trim($_POST['T2']);


    $SQL mysql_query(" select * from user where username='".$user."' and password='".$pass."' ") or die (mysql_error());


    if( 
    mysql_num_rows($SQL) != "0" ){


    $info mysql_fetch_array($SQL);


    $_SESSION['userid'] = "$info[userid];
    $_SESSION['username'] = "$info[username]";
    $_SESSION['level'] = "$info[level]";

    ECHO 
    " <center><b>تم تسجيل الدخول بنجاح ";
    ECHO 
    " <br><center><b>جـــاري تحويلك للصفحة المطلوبة تلقاتياً ";


    echo
    "<meta http-equiv = refresh content=0;url=index.php>";


    } else {

    ECHO 
    "<center><b> عفوا تأكد من صحة المعلومات ";

    }
    break;
    default:
    ?>

    <html dir="rtl">

    <head>
    <meta http-equiv="Content-Language" content="ar-sa">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1256">

    </head>

    <body>

    <table border="0" width="100%">
        <tr>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>
            <form method="POST" action="?login=a">
                <div align="center">
    &nbsp;<table border="0" width="44%">
                        <tr>
                            <td colspan="2">&nbsp;</td>
                        </tr>
                        <tr>
                            <td align="left">
                            <span lang="ar-sa">
                            <font face="Tahoma" style="font-size: 10px">اسم المستخدم</font></span><font face="Tahoma" style="font-size: 10px"> 
                            :</font></td>
                            <td><input type="text" name="T1" size="20"></td>
                        </tr>
                        <tr>
                            <td align="left">
                            <span lang="ar-sa">
                            <font face="Tahoma" style="font-size: 10px">كلمة المرور</font></span><font face="Tahoma" style="font-size: 10px"> 
                            :</font></td>
                            <td><input type="password" name="T2" size="20"></td>
                        </tr>
                    </table>
                </div>
                <p align="center">
                <input type="submit" value="تسجيل الدخول" name="B1"></p>
            </form>
            </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
        </tr>
    </table>

    </body>

    </html>
    <?
    break;
    }
    ?>







  14. #14
    عضو نشيط جدا
    تاريخ التسجيل
    Jan 2008
    المشاركات
    392


    اخوي تظهر لي الصفحة بيضاء بعد تسجيل الدخول






  15. #15
    عضو نشيط جدا
    تاريخ التسجيل
    Nov 2000
    المشاركات
    504


    اضف الصفحة اللي يظهر فيها الخطأ










ضوابط المشاركة

  • لا تستطيع إضافة مواضيع جديدة
  • لا تستطيع الرد على المواضيع
  • لا تستطيع إرفاق ملفات
  • لا تستطيع تعديل مشاركاتك
  •  

أضف موقعك هنا| اخبار السيارات | حراج | شقق للايجار في الكويت | بيوت للبيع في الكويت | دليل الكويت العقاري | مقروء | شركة كشف تسربات المياه | شركة عزل اسطح بالرياض | عزل فوم بالرياض| عزل اسطح بالرياض | كشف تسربات المياة بالرياض | شركة عزل اسطح بالرياض