صفحة 1 من 1

[ ????? ] ????? ?? ??? ???? ????? ??????? ??? ??????? ?? DB

مرسل: الأربعاء فبراير 08, 2012 3:26 am
بواسطة rakonda
??? ???? ??????? ??????
?????? ??? ?????? ??? ???????? ????? ????? ???? ????? ??????? ??? ???????? ?? ????? ???????? ??? ????? ?????? ????? ??????? ? ???????? ???? ???? phpBB3
??? ????? ???? ???? ??????? ?????? ??????? ?? ???? ???? ???? ??????? ?????? ??????? ???? ??? 10 ???????? ?? ??????? ??? ?????? ??????? ?????? ????? ????? ?????? ?? ?????? ?????..
??? ???? ???? ???? ??????? phpbb ???? phpbb_news ????? ??? news_id news_title news_text news_user news_date ??? ?? ??????
صورة

? ?????? ??????
صورة

????? ? header ??? ????

كود: تحديد الكل

<meta http-equiv="content-type" content="text/html" charset="windows-1256">
???? ???? ?? ?????? ??????? ??? ?? ??? ?? ?? ????? ??? ???????? ???????? ?? ??????? ????? ???????

صورة
صورة

??????? ?????? ???????? ???? ??????? ???????? ?????? ????? class dbal ????? ????????

كود: تحديد الكل

$db->sql_query
$db->sql_fetchrow
?????? ????? ????? ?? ??? ??? ?????????
صورة

????? ????? ????????

كود: تحديد الكل

<?php
        /*** phpBB3 - Last Active Topics System ***/
    //Show last x topics
    define('TOPICS_LIMIT',10);

    // Create arrays
    $topics = array();
    
    // Get forums that current user has read rights to.
    $forums = array_unique(array_keys($auth->acl_getf('f_read', true)));
    
    // Get active topics.
    $sql="SELECT *
    FROM " . TOPICS_TABLE . "
    WHERE topic_approved = '1' AND " . $db->sql_in_set('forum_id', $forums) . "
    ORDER BY topic_last_post_time DESC";
    $result = $db->sql_query_limit($sql,TOPICS_LIMIT);
    while ($r = $db->sql_fetchrow($result))
    {
        $topics[] = $r;
    }
   $db->sql_freeresult($result);
?>
??? ?????? ?????? ?????? ?? ??? ?????? ???? phpbb_news
صورة

?????? ???????? ?? ????? ???????? ??????

كود: تحديد الكل

    
    $user = $user->data['username'];
    $title= htmlentities($_POST['news_title'], ENT_QUOTES);
    $title= htmlspecialchars($title);
    
	    $text=htmlentities($_POST['news_text'], ENT_QUOTES);
	$text= htmlspecialchars($text);
    $news_date = date("Y/m/d")." ".date('H:m:s');
    $random_id= rand(1111111,9999999);
    $sql = "insert into phpbb_news VALUES('$random_id','$title','$text','$user','$news_date')";
    $db->sql_query($sql);
    $db->sql_freeresult($result);
?????? ???????? ?? ??? ???????? ?? ??????

كود: تحديد الكل

$result = $db->sql_query("select * from phpbb_news");
while ($row = $db->sql_fetchrow($result))
{
    $news_id = $row['news_id'];
    $news_user = $row['news_user'];
    $news_title =htmlspecialchars_decode(html_entity_decode($row['news_title']));
    $news_date = $row['news_date'];
}
???? ?????? ??? ????? ??? ??????? ?? ??? ???????? ???.
????? ?? ???? ?? ????? ???? ??? ??????.
??????? ??? ???? ????? ? ??????? ?????? ???? =)[/size]

????? ?? ??? ???? ????? ??????? ??? ??????? ?? database

مرسل: الأربعاء فبراير 08, 2012 4:16 am
بواسطة Garebooo
????? ??????? ???????? ?? utf8 ???? windows

????? ?? ??? ???? ????? ??????? ??? ??????? ?? database

مرسل: الأربعاء فبراير 08, 2012 5:38 am
بواسطة rakonda
???? ??? ??? ???? ?????? .
??? ??? ????? ??????? ?? windows ??? utf8 ????? ???? ??? ??????!
??????? windows
صورة

??????? utf8
صورة

????? ?? ??? ???? ????? ??????? ??? ??????? ?? database

مرسل: الأربعاء فبراير 08, 2012 2:24 pm
بواسطة vixus
??? ????? ????? ?????? ?????? ????? ????? ??? utf8 ???? ?? latin_swedish

??? ??? ???? ?????? ????? ??????? ??????? ???? ??? ????? notepad++
??? ??????? ??? utf8

???? ??? ??????? ??????? ?? ???? utf ??????? ?? ????? ???

?? ??? ???? ???? ??? ?? ??? ????? ???? ?????

????? ?? ??? ???? ????? ??????? ??? ??????? ?? database

مرسل: الأربعاء فبراير 08, 2012 9:25 pm
بواسطة rakonda
???? ??? vixus ??? ???? ????? ????? ?????? ??? utf8_general_ci
????? ??? ?????? ????? ???? ????? ?????? ??? ??????? utf ????? ???????.
?????? ??? ??????? ??? ???? ????? ??? ??????? ANSI ???? ????? charset="windows-1256" ????? ?????? ???????.
??? ????? ?? ?? ??????? ??????? :mrgreen:
???? ?????? ???.