إستفسار بخصوص لغة php

منتدى عام جداً...اطرح هنا أي موضوع لايتناسب مع أحد الأقسام الخاصة
يمنع إضافة مواضيع النقاش أو طلبات الدعم حول phpBB

المشرف: alhitary

قوانين المنتدى
هذا المنتدى عام جداً ويمنع طلب الدعم الفني أو ما يخص phpBB فقط نقاشات عامة تهم أصحاب المنتديات، كذلك يمنع بتاتاً إضافة المواضيع المتعلقه بالهكر، الكراك، السيريلات، البروكسي
صورة العضو الرمزية
harede2006
عضو متميز
عضو متميز
مشاركات: 232
اشترك في: الجمعة مايو 05, 2006 2:33 am

??????? ????? ??? php

مشاركةبواسطة harede2006 » الخميس أغسطس 26, 2010 2:31 am

?????? ?????

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

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

????? ????
show.php ???? ???? ????? ??????

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

<?php  
	include('easytemplate.php');
	$con=mysql_connect("localhost","root","=");  //SQL??????? ?? .  
	  if(!$con)  
	  {  
	   die('can not connect'.mysql_error());  
	  }  
		mysql_select_db( site , $con );  

		$result = mysql_query("select * from post");  
		$num = mysql_num_rows($result); 
		$i=0;  

  while( $i < $num )  {  
   		$post_id  = mysql_result( $result , $i , "post_id"    );  
		$title = mysql_result( $result , $i , "title" );  
		$data = mysql_result( $result , $i , "data" );  
	   ++$i;  
  }  
    
	$tmpl = new EasyTemplate('style','cache');
	print $tmpl->display('body/showpost_body.html');
	mysql_close($con);  
 ?>
??? ?????? ??? ????? ????????

<table border='1' width='100%' id='table1'>

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

   <tr>
   <td width='5%'>{post_id}</td> 
   <td width='44%'>{title} </td> 
   <td width='20%'>{data}</td> 
   <td width='10%'> <a href='edit.php?id=$post_id'> [Edit] </a> </td>  
   <td width='10%'> <a href='del.php?id=$post_id'>[delete] </a> </td> 
   </tr> 
  </table>


??????? ?? ??? ??? ????? ?? ???? ?? ??? ???????? ?? ???? ????? ?? ????? ???????? ??? ???? ???????? ??????
??? ?? ??? show ???? ????? while ???? ???? ???? ????? ????? while ??? ??? ?????? ??? ??? ???




صورة العضو الرمزية
harede2006
عضو متميز
عضو متميز
مشاركات: 232
اشترك في: الجمعة مايو 05, 2006 2:33 am

??????? ????? ??? php

مشاركةبواسطة harede2006 » السبت أغسطس 28, 2010 7:34 am

???? ???? ?? ?????? ??? ????????
????:

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

http://daif.net/easy/?name=loop
?????? ?? ??????? LOOP ????? ???? ???? ????? ??? ?? ??? ????? ???? ?? ????? ??? ???? ??? ??? ????? ???????? ?? ????? ??????? ?? ????? ??????? , ???? ??? ????? ??????? ??? ???????? ?? ??? ???? ??????? SQL ??? ??????? ???? ??????? ????? ???? ??? ???? ????? ?????? ??? ??????? LIMIT ???? ???? ??? ??? ??????? ?? ?????? ??????? ???? ????? ????? ?????? ???? ??????? ?? ??????? NAME ???? ???? _paging ?????? ??? ????? ???? ??????? ???? ??? ?? ????? 1 ??? ??? ??????? .
?????? ?????? ?? ??? ????? ?????? ????? ??? 9 ????? ?? ???? ????? ??? ?????? ???? ??? id ? name ??? ???? ??? html ??? ??????? ??? ???????? ?????? ????? ??? ??? ??????? ??? ?? ????? ?????? ???.?

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

<?
for($i=0;$i<=5;$i++){
    $rows[] = array('id'=>$i,'name'=>'name'.$i);
}
?> 

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

html
<LOOP NAME="{rows}">
{rows.id} - {rows.name}
</LOOP>
</IF> 

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

result
1 - name1
2 - name2
3 - name3
4 - name4
5 - name5 

صورة العضو الرمزية
harede2006
عضو متميز
عضو متميز
مشاركات: 232
اشترك في: الجمعة مايو 05, 2006 2:33 am

??????? ????? ??? php

مشاركةبواسطة harede2006 » الأحد أغسطس 29, 2010 2:30 am

?? ??????? ???? ..

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

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

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

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

	$post_all = "SELECT forum_id , name,img,des FROM forum WHERE forum_id= ???" ;
??? ???? ?? ????? ??? ?????? ??? ?? ???? ? ???? ???? ?? ?????? ???????? ?????? ?
------

developer.mahmoud
عضو شرف
عضو شرف
مشاركات: 703
اشترك في: الثلاثاء يوليو 11, 2006 3:36 pm
مكان: مصر ام الدنيا
اتصال:

??????? ????? ??? php

مشاركةبواسطة developer.mahmoud » الاثنين أغسطس 30, 2010 3:31 am

??? ???? ???? ??? ???? ??? ?? ??? ??? ????? ?? ???? ??????? ???????? ??? ???? ??? ????? ????? ?? ??? 5
m :) MY WORLD :) m
under construction

still under-develop v 0.05 ! see what happen
;)

* الان اضافة الرفع المتقدم لكليجا *
http://moffed.com/community/viewtopic.php?f=37&t=4654
http://devm.me

صورة العضو الرمزية
harede2006
عضو متميز
عضو متميز
مشاركات: 232
اشترك في: الجمعة مايو 05, 2006 2:33 am

??????? ????? ??? php

مشاركةبواسطة harede2006 » الاثنين أغسطس 30, 2010 2:17 pm

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

developer.mahmoud
عضو شرف
عضو شرف
مشاركات: 703
اشترك في: الثلاثاء يوليو 11, 2006 3:36 pm
مكان: مصر ام الدنيا
اتصال:

??????? ????? ??? php

مشاركةبواسطة developer.mahmoud » الاثنين أغسطس 30, 2010 5:22 pm

????? ????? ??? ???????? ?? ???? ??????? .
???? ???????? ????? ??? ??? ????? ???
???? ???????? ????? ??? ?? ?? ????? , ????? ??????? ????? ??? ?? ?? ???? ????? ?????? ?????
???? ????? ????? ??? ??? ??? ????? ???????? ?? ???? ???????? , ???? ??????? ????? ??? ???????? ??? ?????? ????? ??? .
m :) MY WORLD :) m
under construction

still under-develop v 0.05 ! see what happen
;)

* الان اضافة الرفع المتقدم لكليجا *
http://moffed.com/community/viewtopic.php?f=37&t=4654
http://devm.me

صورة العضو الرمزية
harede2006
عضو متميز
عضو متميز
مشاركات: 232
اشترك في: الجمعة مايو 05, 2006 2:33 am

??????? ????? ??? php

مشاركةبواسطة harede2006 » الاثنين أغسطس 30, 2010 6:25 pm

???? ???????? ????? ??? ?? ?? ????? , ????? ??????? ????? ??? ?? ?? ???? ????? ?????? ?????
??? ???? ???? ??? ????? ???? ???? ???????? ????? ??? ???????? ????? ??????? ??? ????? ???? ?? ???
??? ???? ???? ?? ??? ????? ????? ????

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

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

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

developer.mahmoud
عضو شرف
عضو شرف
مشاركات: 703
اشترك في: الثلاثاء يوليو 11, 2006 3:36 pm
مكان: مصر ام الدنيا
اتصال:

??????? ????? ??? php

مشاركةبواسطة developer.mahmoud » الاثنين أغسطس 30, 2010 10:02 pm

harede2006 كتب:???? ???????? ???? ?? ?????? ????? ?? ??????? ?
???? : ??? ?? ???? 3 ??? ??? ?? ??? ???? sql ???? ???????? ????? ??? , ?? ?? ???? 5 ?????? ?? ?? ??? ???? ???? select ????? ??????? ???? ??? ????? ????? sql ???? ??? ???? ?????? ???? ?????

??? ????? ???? ???? row ?? ??? ????? ???? ?????? ????? LEFT JOIN
http://www.w3schools.com/sql/sql_join_left.asp

???? ?? : ??? ??? ????? ??? ??? ????? ??? ????? ?????? ?? ????? ??? ????? ??? ??????? ?
m :) MY WORLD :) m
under construction

still under-develop v 0.05 ! see what happen
;)

* الان اضافة الرفع المتقدم لكليجا *
http://moffed.com/community/viewtopic.php?f=37&t=4654
http://devm.me

صورة العضو الرمزية
harede2006
عضو متميز
عضو متميز
مشاركات: 232
اشترك في: الجمعة مايو 05, 2006 2:33 am

??????? ????? ??? php

مشاركةبواسطة harede2006 » الثلاثاء أغسطس 31, 2010 2:03 pm

?????? ?????

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

?? ??????? ????
???? ???? ?????? ??????? ??????? ????? ???? ?? ??? ??????? ??? ????? ????????
???? ???? ?????? ?? ??? ????? ?????? ???? ???? ????? ????? ??? ????? ??? ????? ?? ?? ??? php ?? ?? html
???????? ??????? ??? ????? ????? ???? ????? ?????? ?? ???? ????? ???

??? ???? ??????? ?? ???? ??? ?????? ???? ?? php

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

<?php

session_start();
if(!$_SESSION['username']){ 
	echo "<font color=\"#FF0000\"><b>please log in <META HTTP-EQUIV=\"refresh\" CONTENT=\"1; URL=login.php\"></b></font>";
exit;
}
	include('easytemplate.php');
	$con=mysql_connect("localhost","root","");
	  if(!$con){  
	   die('can not connect'.mysql_error());  
	  } 
	  	mysql_select_db( site , $con ); 


if (isset($_POST['newpost'])){
if($title == "" || $img == "" || $data == ""  ) { 
 die("<b>??? ???? ???/???? ?????</b>");
    }  
	$sql="INSERT INTO post (title, img, data, forum_id) VALUES ('$_POST[title]','$_POST[img]','$_POST[data]','$_POST[forum_id]')";
		if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); }	
	$post_id = "SELECT post_id FROM post  ORDER BY post_id DESC LIMIT 1" ;

}
 
if (isset($_POST['edit'])){

if($title == "" || $data == "" || $img_post == ""  ) { 
     die("<b>??? ???? ???/???? ?????</b>");  
   }  
   $query_post2 = "update post set title='$title', img='$img_post',data='$data' where post_id='$post_id'";
   mysql_query($query_post2);  
   
   $query_forum2 = "update forum set name='$name', des='$des', img='$img_forum' where forum_id='$forum_id'";
   mysql_query($query_forum2); 
}	
    $tmpl = new EasyTemplate('style','cache');
	print $tmpl->display('body/inserted_body.html');
	mysql_close($con);
 ?>

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

<INCLUDE NAME="body/header_body.html">
	<table border="0" width="100%" bordercolorlight="#000000" style="border-collapse: collapse" cellpadding="4">
		<tr>
			<td>
						<IF NAME="{newpost}">
			 <p align="center">?? ????? ??????? ?????</p>
			<p align="center"><LOOP NAME="{rows}" SQL="{post_id}" LIMIT="1"><a href="showpost.php?id={rows.post_id}">???? ??? ??????? ???????</a></LOOP></p>
			</IF>
			<IF NAME="{edit}">
			<p align="center">?? ????? ??????? ?????</p><p align="center"><a href="showpost.php?id={post_id}">???? ??? ??????? ???????</a></p>
			</IF>
  		   	</td>
		</tr> 

	</table>
<INCLUDE NAME="body/footer_body.html">

 

developer.mahmoud
عضو شرف
عضو شرف
مشاركات: 703
اشترك في: الثلاثاء يوليو 11, 2006 3:36 pm
مكان: مصر ام الدنيا
اتصال:

??????? ????? ??? php

مشاركةبواسطة developer.mahmoud » الثلاثاء أغسطس 31, 2010 9:11 pm

harede2006 كتب:?? ??? ?????? ???? ??? ????? ??? ?????? ?? ?????? ??? ??? ???? ??? ?? ??? ???? ??? ???? ?????? ?? ?????? ????????
?? ????? ?? ????? ??? ?????? ?
?? ??????? ??? ??? ?????? ?? ??? ??????.

????????? ?????? : ???? ?????? ???? ???????????
m :) MY WORLD :) m
under construction

still under-develop v 0.05 ! see what happen
;)

* الان اضافة الرفع المتقدم لكليجا *
http://moffed.com/community/viewtopic.php?f=37&t=4654
http://devm.me

صورة العضو الرمزية
harede2006
عضو متميز
عضو متميز
مشاركات: 232
اشترك في: الجمعة مايو 05, 2006 2:33 am

??????? ????? ??? php

مشاركةبواسطة harede2006 » الجمعة سبتمبر 03, 2010 1:06 am

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

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

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

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

developer.mahmoud
عضو شرف
عضو شرف
مشاركات: 703
اشترك في: الثلاثاء يوليو 11, 2006 3:36 pm
مكان: مصر ام الدنيا
اتصال:

??????? ????? ??? php

مشاركةبواسطة developer.mahmoud » الجمعة سبتمبر 03, 2010 1:21 am

harede2006 كتب:?????? ????? ????? ???? ???????

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

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

????? ????? ?????? ??????? ?????? ??? ?? ????????? ????
??? ???? ?????? ????? ??? ?? ??? ??? ?? ?????? ???? :)
m :) MY WORLD :) m
under construction

still under-develop v 0.05 ! see what happen
;)

* الان اضافة الرفع المتقدم لكليجا *
http://moffed.com/community/viewtopic.php?f=37&t=4654
http://devm.me

صورة العضو الرمزية
harede2006
عضو متميز
عضو متميز
مشاركات: 232
اشترك في: الجمعة مايو 05, 2006 2:33 am

??????? ????? ??? php

مشاركةبواسطة harede2006 » الجمعة سبتمبر 03, 2010 1:41 am

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

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

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

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

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

http://harede.0fees.net/a/
http://harede.0fees.net/a/admin

medo
test

?????? ?????? ??? ????? ???? ??????? ?? ???? ????? ??? ???? ????? ???? ??? ?????? ???? ?? ?? ?? ?????? ????? ??? :oops:

developer.mahmoud
عضو شرف
عضو شرف
مشاركات: 703
اشترك في: الثلاثاء يوليو 11, 2006 3:36 pm
مكان: مصر ام الدنيا
اتصال:

??????? ????? ??? php

مشاركةبواسطة developer.mahmoud » الجمعة سبتمبر 03, 2010 2:06 am

???? ????? ????? :)
m :) MY WORLD :) m
under construction

still under-develop v 0.05 ! see what happen
;)

* الان اضافة الرفع المتقدم لكليجا *
http://moffed.com/community/viewtopic.php?f=37&t=4654
http://devm.me

صورة العضو الرمزية
harede2006
عضو متميز
عضو متميز
مشاركات: 232
اشترك في: الجمعة مايو 05, 2006 2:33 am

??????? ????? ??? php

مشاركةبواسطة harede2006 » الجمعة سبتمبر 03, 2010 4:03 am

?????? ?????

?? ??? ??????? ??? ???? ?????? ???? ????? ???? ????? ???????? ????? ?? inserted.php

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

<?php

session_start();
if(!$_SESSION['username']){ 
	echo "<font color=\"#FF0000\"><b>please log in <META HTTP-EQUIV=\"refresh\" CONTENT=\"1; URL=login.php\"></b></font>";
exit;
}
 	include('../config.php');
 	include('../easytemplate.php');
	$con = mysql_connect("$hostname","$user","$pass");
	  if(!$con){  
	   die('can not connect'.mysql_error());  
	  } 
	mysql_select_db($db_name,$con);


if (isset($_POST['newpost'])){
if($title == "" || $img == "" || $data == ""  ) { 
 die("<b>??? ???? ???/???? ?????</b>");
    }  
	$sql="INSERT INTO post (title, img, small_data, data, forum_id) VALUES ('$_POST[title]','$_POST[img]','$_POST[small_data]','$_POST[data]','$_POST[forum_id]')";
		if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); }	
	$post_id = "SELECT post_id FROM post  ORDER BY post_id DESC LIMIT 1" ;
}
 
if (isset($_POST['edit'])){

if($title == "" || $data == "" || $img == "") { 
     die("<b>??? ???? ???/???? ?????</b>");  
   }  
   $query_post2 = "update post set title='$title', small_data = '$small_data', img='$img',data='$data' ,forum_id='$forum_id' where post_id='$post_id'";
   mysql_query($query_post2);  
   
}	
    $tmpl = new EasyTemplate('style','cache');
	print $tmpl->display('body/inserted_body.html');
	mysql_close($con);
 ?>


العودة إلى ”ساحه عامه“

الموجودون الآن

المتصفحون للمنتدى الآن: لا يوجد أعضاء مسجلين متصلين و 8 زوار