Jump to content
Sign in to follow this  
masrawy

Problem Of Sending Email To User

Recommended Posts

You have these three variables available in the script:$user=mysql_num_rows($result11);$usermem=mysql_num_rows($result112);$usertot=$usermem+$user;So $user and $usermem each have a number, and $usertot is the sum. Check the queries to see which numbers they have, but I assume you just want to print one or more of those numbers out.

Share this post


Link to post
Share on other sites

this is the outprintecho "<table width=100%>";echo "<tr><td>";echo "المتواجدون: ";include('online/useronline.php'); echo "$usertot (الأعضاء:$usermem     الزوار:$user)";br();echo "الزيارات اليوم :$n_total     أمس :$yesterday";echo "</td></tr></table>";//echo "<tr><td><font color=#000000>عدد الزوار الإجمالي</font>   ($n_total) *** <font color=#000000>عدد المتواجدين الآن</font> ";include('online/useronline.php'); echo" ***<font color=#000000>عدد الأعضاء</font>  ($count_m)</td></tr></

Share this post


Link to post
Share on other sites
but all the tome $usermem=0$user=1
Look at the code, that means that 1 IP address for a user who is not logged in has accessed that particular page within the last 3 seconds. That's not a problem with the code, that's exactly the information that you're asking it for.

Share this post


Link to post
Share on other sites

$usermem contains the number of logged in users who have accessed the current page within the last 3 seconds.

Share this post


Link to post
Share on other sites

Checking permissions is always the same. You need a permission in the database, so your users table needs a field to say if that's a "special" user. In your delete code, look up the user in the database and check the field before doing the delete.

Share this post


Link to post
Share on other sites

It's not very difficult, which part of the code don't you understand? I assume you already have delete code somewhere. You need to add code to send a database query and look up the field in the database. You should be able to figure out how to do that.

Share this post


Link to post
Share on other sites

<? $asmemr1_select = mysql_query ("SELECT * from ssubject where id='$ssub_id' and active='1'"); while ($Row515=mysql_fetch_array($asmemr1_select)) { $memberr_id = $Row515[mem_id]; $asmm_select = mysql_query ("SELECT * from members where id='$member_id' and active='1'"); while ($Row16=mysql_fetch_array($asmm_select)) { $speciall = $Row16 [special]; } }if ($special == "1" AND $mem_id == $memberid){?> <tr> <td colspan="2" bgcolor="<? echo $col1; ?>"> <p align="center"> <a href="index.php?action=delete_subject&rep_id=<? echo $repid; ?>&subjectid=<? echo $subjectid; ?>" ><span lang="ar-eg">حـــذف</span></a></td> </tr><? } else {}?>

Share this post


Link to post
Share on other sites

<?$asmemr1_select = mysql_query ("SELECT * from ssubject where id='$ssub_id' and active='1'");while ($Row515=mysql_fetch_array($asmemr1_select)){$memberr_id = $Row515[mem_id];$asmm_select = mysql_query ("SELECT * from members where id='$member_id' and active='1'");while ($Row16=mysql_fetch_array($asmm_select)){$speciall = $Row16 [special];}}if ($special == "1" AND $mem_id == $memberid){?><tr><td colspan="2" bgcolor="<? echo $col1; ?>"><p align="center"><a href="index.php?action=delete_subject&rep_id=<? echo $repid; ?>&subjectid=<? echo $subjectid; ?>" ><span lang="ar-eg">حـــذف</span></a></td></tr><? }else {}?> i need the spicial member can delet his replayand any function do the same of int_set

Share this post


Link to post
Share on other sites

$speciall = $Row16 [special];}}if ($special == "1" AND $mem_id == $memberid){Those need to be spelled the same.

Share this post


Link to post
Share on other sites

Well, then check the code that does the delete to figure out why. You should be able to think of that on your own, it doesn't sound like you're trying very hard. If you click delete and it's not deleting, then look at the delete code to figure out why!

Share this post


Link to post
Share on other sites

itry sir and i find this code <p align="center"><a href="index.php?action=delete_subject&rep_id=<? echo $repid; ?>&subjectid=<? echo $subjectid; ?>" ><span lang="ar-eg">حـــذف</span></a></td>but it is not get information frome data base

Share this post


Link to post
Share on other sites

i find this code for delet replay if ($action == "delete_replly") {br(); br();echo "<center><font size=4 face=\"Traditional Arabic\"><b> حزف الرد </b></font></center>";br(); br();echo "<p align=right><font size=2 color=#FF0000><b>   </b></font></p>"; $result = mysql_query("SELECT mem_id FROM subject_replays WHERE id='{$sid}'");if ($row = mysql_fetch_assoc($result)){ if ($row['mem_id'] == $memberid) { $delete=mysql_query("DELETE from subject_replays WHERE id='$sid'"); if($delete){echo "تم الحذف بنجاح";} else {echo "ليس لديك صلاحية هذا هذا الاعلان";} } else { echo "ليس لديك صلاحية لحزف الرد"; }}else{ echo "هذا الاعلان غير موجود ";}echo "<meta http-equiv=\"refresh\" content=\"0; URL=index.php\">";}but i think ther is arong thing ?

Share this post


Link to post
Share on other sites

This is the link you're printing:<a href="index.php?action=delete_subject&rep_id=...It runs the "delete_subject" code, not the "delete_replly" code.

Share this post


Link to post
Share on other sites

I'm not sure which of those messages you posted above says not found, but print $sid to make sure it's what you expect it to be.

Share this post


Link to post
Share on other sites

hi sirthis code you write it for delet subject before i put it to delet replayif ($action == "delete_replly") {br(); br();echo "<center><font size=4 face=\"Traditional Arabic\"><b> حزف الرد </b></font></center>";br(); br();echo "<p align=right><font size=2 color=#FF0000><b>   </b></font></p>";$result = mysql_query("SELECT mem_id FROM subject_replays WHERE id='{$sid}'");if ($row = mysql_fetch_assoc($result)){if ($row['mem_id'] == $memberid){$delete=mysql_query("DELETE from subject_replays WHERE id='$sid'");if($delete){echo "تم الحذف بنجاح";} else {echo "ليس لديك صلاحية هذا هذا الاعلان";}}else{echo "ليس لديك صلاحية لحزف الرد";}}else{echo "هذا الاعلان غير موجود ";}echo "<meta http-equiv=\"refresh\" content=\"0; URL=index.php\">";}

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...