Jump to content

mrjameer

Members
  • Posts

    102
  • Joined

  • Last visited

    Never

Everything posted by mrjameer

  1. hi, i want to convert the bmp or gif image to jpg.how i can.any of your help will be surely appreciated.any links or tutorials help is great advantage to me thanks mrjameer
  2. Hi, i have mysql 5.0.37 on my pc.now i want to download postgresql and test some php scripts with it on localhost.is it ok.if i installed postgresql,the mysql will still remains as it is? can i use both at a time. thanks mrjameer
  3. hi can any body tell me what is the encrytion technique used for the password which is stored in user table and mysql database when we login to phpmyadmin thanks mrjameer
  4. hi i have to give some more clear idea CREATE TABLE `category` ( `cat_id` int(2) NOT NULL auto_increment, `category` varchar(25) NOT NULL, PRIMARY KEY (`cat_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ; -- -- Dumping data for table `category` -- INSERT INTO `category` VALUES (1, 'Fruits'); INSERT INTO `category` VALUES (10, 'cars'); CREATE TABLE `subcategory` ( `subcat_id` int(3) NOT NULL auto_increment, `cat_id` int(2) NOT NULL default '0', `subcategory` varchar(25) NOT NULL default '', UNIQUE KEY `subcat_id` (`subcat_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=31 ; -- -- Dumping data for table `subcategory` -- INSERT INTO `subcategory` VALUES (30, 1, 'heavyfruits'); INSERT INTO `subcategory` VALUES (23, 1, 'bbb'); INSERT INTO `subcategory` VALUES (22, 10, 'aaa'); INSERT INTO `subcategory` VALUES (29, 1, 'middlefruits'); INSERT INTO `subcategory` VALUES (26, 1, 'fruits'); INSERT INTO `subcategory` VALUES (28, 1, 'lightfruits'); CREATE TABLE `subsubcategory` ( `cat_id` int( NOT NULL default '0', `subcat_id` int( NOT NULL default '0', `subsubcat_id` int(11) NOT NULL auto_increment, `subcat2` varchar(15) NOT NULL default '', PRIMARY KEY (`subsubcat_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=50 ; -- -- Dumping data for table `subsubcategory` -- INSERT INTO `subsubcategory` VALUES (1, 28, 47, 'light2'); INSERT INTO `subsubcategory` VALUES (1, 28, 46, 'light1'); INSERT INTO `subsubcategory` VALUES (1, 30, 45, 'heavy2'); INSERT INTO `subsubcategory` VALUES (1, 30, 44, 'heavy1'); INSERT INTO `subsubcategory` VALUES (1, 26, 42, 'oranges'); INSERT INTO `subsubcategory` VALUES (10, 22, 41, 'hi'); INSERT INTO `subsubcategory` VALUES (1, 23, 40, 'apple'); INSERT INTO `subsubcategory` VALUES (1, 29, 49, 'middle1'); INSERT INTO `subsubcategory` VALUES (1, 28, 48, 'light3'); <?php include 'config.php'; $sql = "SELECT * FROM subsubcategory C INNER JOIN subcategory S ON C.subcat_id=S.subcat_id ORDER BY S.subcat_id"; while($row = mysql_fetch_array($result)){ if($lastState != $row['subsubcat_id']) print "{$row['subcategory']} "; print "<font color=#FFFFFF>{$row['subcat2']}</font> "; $lastState = $row['subcat_id']; } ?> i want to display just cat_id='1' data and all subcats and subsubcats of it output aaa hi bbb apple fruits oranges lightfruits light2 lightfruits light3 lightfruits light1 middlefruits middle1 heavyfruits heavy2 heavyfruits heavy1 thanks mrjameer
  5. hi i have to give some more clear idea CREATE TABLE `category` ( `cat_id` int(2) NOT NULL auto_increment, `category` varchar(25) NOT NULL, PRIMARY KEY (`cat_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ; -- -- Dumping data for table `category` -- INSERT INTO `category` VALUES (1, 'Fruits'); INSERT INTO `category` VALUES (10, 'cars'); CREATE TABLE `subcategory` ( `subcat_id` int(3) NOT NULL auto_increment, `cat_id` int(2) NOT NULL default '0', `subcategory` varchar(25) NOT NULL default '', UNIQUE KEY `subcat_id` (`subcat_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=31 ; -- -- Dumping data for table `subcategory` -- INSERT INTO `subcategory` VALUES (30, 1, 'heavyfruits'); INSERT INTO `subcategory` VALUES (23, 1, 'bbb'); INSERT INTO `subcategory` VALUES (22, 10, 'aaa'); INSERT INTO `subcategory` VALUES (29, 1, 'middlefruits'); INSERT INTO `subcategory` VALUES (26, 1, 'fruits'); INSERT INTO `subcategory` VALUES (28, 1, 'lightfruits'); CREATE TABLE `subsubcategory` ( `cat_id` int( NOT NULL default '0', `subcat_id` int( NOT NULL default '0', `subsubcat_id` int(11) NOT NULL auto_increment, `subcat2` varchar(15) NOT NULL default '', PRIMARY KEY (`subsubcat_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=50 ; -- -- Dumping data for table `subsubcategory` -- INSERT INTO `subsubcategory` VALUES (1, 28, 47, 'light2'); INSERT INTO `subsubcategory` VALUES (1, 28, 46, 'light1'); INSERT INTO `subsubcategory` VALUES (1, 30, 45, 'heavy2'); INSERT INTO `subsubcategory` VALUES (1, 30, 44, 'heavy1'); INSERT INTO `subsubcategory` VALUES (1, 26, 42, 'oranges'); INSERT INTO `subsubcategory` VALUES (10, 22, 41, 'hi'); INSERT INTO `subsubcategory` VALUES (1, 23, 40, 'apple'); INSERT INTO `subsubcategory` VALUES (1, 29, 49, 'middle1'); INSERT INTO `subsubcategory` VALUES (1, 28, 48, 'light3'); <?php include 'config.php'; $sql = "SELECT * FROM subsubcategory C INNER JOIN subcategory S ON C.subcat_id=S.subcat_id ORDER BY S.subcat_id"; while($row = mysql_fetch_array($result)){ if($lastState != $row['subsubcat_id']) print "{$row['subcategory']}<br />"; print "<font color=#FFFFFF>{$row['subcat2']}</font><br />"; $lastState = $row['subcat_id']; } i want to display just cat_id='1' data and all subcats and subsubcats of it [u]output[/u] aaa hi bbb apple fruits oranges lightfruits light2 lightfruits light3 lightfruits light1 middlefruits middle1 heavyfruits heavy2 heavyfruits heavy1 thanks mrjameer
  6. hi now it is displaying the state names and city names but state name are repeating.i just want to print in the way that first print the state name and all the citys under it like that.i have to add one where condition also so that it display the particular coutry states and citys only thanks again best regards mrjameer
  7. hi it is just displaying the city names but not state names regards mrjameer
  8. hi rhodesa thanks for your reply sorry here i have a small adjustment state_id,state_name 1---ca 2---ba 3---da second table name is citys fields are cityid,state_id,city_name 1--1---texas 2--1---newyork 3--2--losangles 4--2--perth 5--2--sydney 6--3--washington
  9. hi, i have 2 mysql tables first table name is states fields are state_id,state_name 1---ca 2---ba 3---da second table name is citys fields are id,state_name,city_name 1--ca---texas 2--ca---newyork 3--ba--losangles 4--ba--perth 5--ba--sydney 6--da--washington what i want to do is i want to fetch data from 2 mysql tables and display as state_name1 cityname1 cityname2 state_name2 cityname1 cityname2 cityname3 like that.just i need the sql query to fetch and display the data in the above format.any of your help will be surely appreciated thanks mrjameer
  10. hi, i have a web site name called www.welcome.com i want to break or explode the site name and store in 3 different variables as follows . $variable1=www; $variable2=welcome; $variable3=com; how i can achieve this.any of your help will be surely appreciated. thanks mrjameer
  11. hi BlueSkyIS your logic worked.it is displaying the results what i want.thanks but when i use like operator it does not display anything. any how thanks for all replys thanks mrjameer
  12. hi i have a mysql table.it has 2 fields 1.register_number 2.registered_date values 333333----2007/08/21 245678----2007/06/30 123123----2007/09/20 123222----2007/09/21 125553----2007/09/22 i have select box on a page and it's option values from january-december. when i select the month from select box and press submit button,it should fetch those records that are registered in that particular month. i just need the sql query logic to fetch the records of that particular month. any of your help will be surely appreciated thanks mrjameer
  13. hi, i want to play some audio and video files(separately) randomly.any tutorials or links or any help will be surely appreciated.i search in google.but i dont get any useful links.. thanks mrjameer
  14. hi, i want some info about how i can put the bbc news,cnn news on my page.is there any opensource rss feed system,so that i can get the news and store it in mysql db and display the news.any of your help will be surely appreciated. i searched over google.find some but complex,i need simple news system. thanks mrjameer
  15. hi, sorry,now i filtered some code. <script language="Javascript"> function EgCheck() { var eg_array = document.getElementsByName("eg_array[]"); for (var i=0; i< eg_array.length; i++) { eg_array[i].checked = true; } } function writecombo($array_name, $name, $selected = "", $start = 0, $add_text = "", $add_text2 = "") { $length = count ($array_name); if (($array_name == "") || ($length == 0)){ echo "<select name=\"$name\"></select>\n"; }else{ echo "<select name=\"$name\" $add_text $add_text2>\n"; while (list($key, $val) = @each($array_name)) { if( !is_array($val) ){ $select_name = $val; $i = $key; echo " <option value=\"$i\""; if ($i == $selected){ echo " selected"; } echo ">$select_name</option>\n"; } } echo "</select>\n"; } } </script> <? if ($_POST['RenewDate']){ $renewIt=mysql_query("update admin set last_login='".time()."'"); if ($renewIt){ echo "<meta http-equiv='Refresh' Content=0;URL='imgman.php'>"; } } $eg_max=10; $limit = $eg_max; ?> <script> function gotocluster(s){ var d = s.options[s.selectedIndex].value self.location.href=d; } </script> <? if (!$start_m){ $starttime = time(); $start_y = date("Y",$starttime); $start_d = date("d",$starttime); $start_m = date("m",$starttime); } if (!$end_m){ $endtime = time(); $end_y = date("Y",$endtime); $end_d = date("d",$endtime); $end_m = date("m",$endtime); } ?> <form method="POST"> <table width="85%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr valign="top"> <td><p>welcome</p></td> <td nowrap> <!-- add writecombo date here --> <? WriteCombo($month_values, "start_m",$start_m);?> / <? WriteCombo($day_values, "start_d",$start_d);?> / <input name="start_y" type="text" size="4" maxlength="4" value="<?=$start_y?>"> -Åáì- <? WriteCombo($month_values, "end_m",$end_m);?> / <? WriteCombo($day_values, "end_d",$end_d);?> / <input name="end_y" type="text" size="4" maxlength="4" value="<?=$end_y?>"> </td> <td align="right"><input type="submit" name="report" value=" view "></form> <form method="post" action="?eg=mod"><input type="submit" name="eg_mod" value="latest"></form></td> </tr> </table> <!--</form>--> <table width="85%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> <form method="POST"> <input type='hidden' name='start_m' value='<?=$start_m?>'> <input type='hidden' name='start_d' value='<?=$start_d?>'> <input type='hidden' name='start_y' value='<?=$start_y?>'> <input type='hidden' name='end_m' value='<?=$end_m?>'> <input type='hidden' name='end_d' value='<?=$end_d?>'> <input type='hidden' name='end_y' value='<?=$end_y?>'> <? if($_POST['report'] || $_GET['report']){ $stime = mktime(0,0,0,$start_m,$start_d,$start_y); $etime = mktime(23,59,59,$end_m,$end_d,$end_y); if($byip){ $sql = "SELECT * FROM images WHERE ipaddress='$byip'"; }else if($byuid){ $sql = "SELECT * FROM images WHERE user='$byuid'"; }else{ $sql = "SELECT * FROM images WHERE date >= $stime AND date <= $etime"; } $qr1 = mysql_query($sql); echo "total: ".mysql_num_rows($qr1)."<br>"; if($byip){ $purl = "imgman.php?report=1&byip=".$byip; }else{ $purl = "imgman.php?report=1&start_m=".$start_m."&start_d=".$start_d."&start_y=".$start_y."&end_m=".$end_m."&end_d=".$end_d."&end_y=".$end_y; } $rowcount = mysql_num_rows($qr1); $pagecount = ceil($rowcount / $limit); print "<table width=100%><td>images: " . ($pageno+1) ."</td><td align=right> <select onChange=\"gotocluster(this)\">\n <option>ÇÎÊÑ ÇáÕÝÍÉ</option>"; for($x=0; $x<$pagecount; $x++){ $p = $x + 1; $l = $x * $limit + 1; $u = $l + $limit - 1; if($u>$rowcount) $u=$rowcount; print "<option value='".$purl."&pageno=".$x."'>ÇáÕÝÍÉ $p ($l - $u)</option>\n"; } print "</select></td></table></form>"; echo "<form method='post' action='eg_del.php'> <input type='submit' value='delete'><br/><br/><a href='javascript:EgCheck();'>check</a> <table width='100%' border='1' cellspacing='4'><tr>"; $l = $pageno * $limit; $u = $l + $limit-1; $count = -1; $i = 1; $eg_count=1; $domCount = 0; while( $a = mysql_fetch_object($qr1) ){ $eg_time = date("Y/m/j h:i:s",$a->date); $count++; $row = ($count % 2)+1; if ($limit && $count < $l ) continue; if($limit && $count > $u) continue; $filen = $siteurl."/".str_replace('./', '', $att_path)."/".$a->filename; $filen = str_replace('http://','%%',$filen); $filen = str_replace('//','/',$filen); $filen = str_replace('%%','http://',$filen); //$thname = $a->thumb; $eg_explode = explode(".",$a->filename); $eg_ex = $eg_explode[1]; if(strtolower($eg_ex) == "jpg" || strtolower($eg_ex) == "gif" || strtolower($eg_ex) == "png" || strtolower($eg_ex) == "jpeg"){ echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='$filen' height=100 width=100 border=0></a><br>"; //$FName = $thname; //echo "<a href='$filen' target='_new'><img src='$filen' width=100 height=100 border=0></a><br>"; } else { echo "no image found<br>"; } if($a->user){ list($username) = mysql_fetch_array( mysql_query("SELECT username FROM users WHERE uid='".$a->user."'") ); echo " <b>ÇáãÇáß:</b> <a href='imgman.php?byuid=".$a->user."&report=1'>".$username."</a><br>"; } echo "<a href='imgman.php?byip=".$a->ipaddress."&report=1'>".$a->ipaddress."</a><br/>"; echo $eg_time."<br/>"; echo "<input type='checkbox' name='eg_array[]' value='$a->id' class='arr'>"; echo "</td>"; if ($eg_count == $eg_in_row){ echo "</tr><tr>"; $eg_count=0; } $eg_count++; } echo "</table></form>"; print "<table width=100%><td>images: " . ($pageno+1) ."</td><td align=right> <select onChange=\"gotocluster(this)\">\n <option>select</option>"; for($x=0; $x<$pagecount; $x++){ $p = $x + 1; $l = $x * $limit + 1; $u = $l + $limit - 1; if($u>$rowcount) $u=$rowcount; print "<option value='".$purl."&pageno=".$x."'>ÇáÕÝÍÉ $p ($l - $u)</option>\n"; } print "</select></td></table>"; }elseif($_GET['eg'] == "mod"){ $eg_sqlmod=mysql_query("select last_login from admin") or die (mysql_error()); $sqlmod=mysql_fetch_array($eg_sqlmod); // Paging ----------------------- if(!(isset($page))) { $page=1; } else { $page=$_GET['page']; } // Max_Per_Page $max=$eg_max; // from page to page $from=($max*$page)-$max; $paging=mysql_query("select id from images where date>='$sqlmod[last_login]'"); $nums=mysql_num_rows($paging); $pages=ceil($nums/$max); // -------------------------------- $sql="select * from images where date>='$sqlmod[last_login]' limit $from,$max"; $qr1 = mysql_query($sql); echo "<input type='submit' name='RenewDate' value='ÊÌÏíÏ ÊÇÑíÎ ÂÎÑ ÒíÇÑÉ'>"; //</form>"; echo "<form method='post' name='myf' action='eg_del.php'> <input type='submit' value='del'><br/><br/> <a href='javascript:EgCheck();'>ÊÍÏíÏ Çáßá</a> <table width='100%' border='1' cellspacing='4'><tr>"; $l = $pageno * $limit; $u = $l + $limit-1; $count = -1; $i = 1; $eg_count=1; $eg_a=0; $domCount = 0; while( $a = mysql_fetch_object($qr1) ){ $eg_time = date("Y/m/j h:i:s",$a->date); $count++; $row = ($count % 2)+1; if ($limit && $count < $l ) continue; if($limit && $count > $u) continue; $filen = $siteurl."/".str_replace('./', '', $att_path)."/".$a->filename; $filen = str_replace('http://','%%',$filen); $filen = str_replace('//','/',$filen); $filen = str_replace('%%','http://',$filen); //$thname = $a->thumb; $eg_explode = explode(".",$a->filename); $eg_ex = $eg_explode[1]; if(strtolower($eg_ex) == "jpg" || strtolower($eg_ex) == "gif" || strtolower($eg_ex) == "png" || strtolower($eg_ex) == "jpeg"){ // $FName = $thname; echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='$filen' width=100 height=100 border=0></a><br>"; } else { echo "<td align='center'>"; echo "no image found<br>"; } /* echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../$filen' border=0></a><br>"; echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../$filen' border=0></a><br>";*/ if($a->user){ list($username) = mysql_fetch_array( mysql_query("SELECT username FROM users WHERE uid='".$a->user."'") ); echo " <b>ÇáãÇáß:</b> <a href='imgman.php?byuid=".$a->user."&report=1'>".$username."</a><br>"; } echo "<a href='imgman.php?byip=".$a->ipaddress."&report=1'>".$a->ipaddress."</a><br>"; echo $eg_time."<br/>"; echo "<input type='checkbox' name='eg_array[]' value='$a->id' class='arr'>"; echo "</td>"; if ($eg_count == $eg_in_row){ echo "</tr><tr>"; $eg_count=0; } $eg_count++; $eg_a++; } echo "</tr></table></form> <center>"; } // paging ---------------------------------------------------- for($i=1;$i<=$pages;$i++) { if($page==$i) { echo"[$i]"; } else { echo "<a href=".$PHP_SELF."?eg=mod&page=$i>[$i]</a> "; } } // ------------------------------------------------------------ ?> <!-- </form>--> </td> </tr> </table> <? include("siteadmin/footer.php"); ?>
  16. hi, iam using the following code to view the uploaded images. i can select the 2 different dates and can see the uploaded images between these 2 different dates.i can also delete those images also.but it is working good on localhost.but when i upload the script on server,it is not displaying the images between 2 different dates which i select,it just displays todays uploaded images.any of your help will be surely appreciated.iam thinking there is mistake in form tags <script language="Javascript"> function EgCheck() { var eg_array = document.getElementsByName("eg_array[]"); for (var i=0; i< eg_array.length; i++) { eg_array[i].checked = true; } } function writecombo($array_name, $name, $selected = "", $start = 0, $add_text = "", $add_text2 = "") { $length = count ($array_name); if (($array_name == "") || ($length == 0)){ echo "<select name=\"$name\"></select>\n"; }else{ echo "<select name=\"$name\" $add_text $add_text2>\n"; while (list($key, $val) = @each($array_name)) { if( !is_array($val) ){ $select_name = $val; $i = $key; echo " <option value=\"$i\""; if ($i == $selected){ echo " selected"; } echo ">$select_name</option>\n"; } } echo "</select>\n"; } } </script> <? if ($_POST['RenewDate']){ $renewIt=mysql_query("update admin set last_login='".time()."'"); if ($renewIt){ echo "<meta http-equiv='Refresh' Content=0;URL='imgman.php'>"; } } $eg_max=10; $limit = $eg_max; ?> <script> function gotocluster(s){ var d = s.options[s.selectedIndex].value self.location.href=d; } </script> <? if (!$start_m){ $starttime = time(); $start_y = date("Y",$starttime); $start_d = date("d",$starttime); $start_m = date("m",$starttime); } if (!$end_m){ $endtime = time(); $end_y = date("Y",$endtime); $end_d = date("d",$endtime); $end_m = date("m",$endtime); } ?> <form method="POST"> <table width="85%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr valign="top"> <td><p>welcome</p></td> <td nowrap> <!-- add writecombo date here --> <? WriteCombo($month_values, "start_m",$start_m);?> / <? WriteCombo($day_values, "start_d",$start_d);?> / <input name="start_y" type="text" size="4" maxlength="4" value="<?=$start_y?>"> -Åáì- <? WriteCombo($month_values, "end_m",$end_m);?> / <? WriteCombo($day_values, "end_d",$end_d);?> / <input name="end_y" type="text" size="4" maxlength="4" value="<?=$end_y?>"> </td> <td align="right"><input type="submit" name="report" value=" view "></form> <form method="post" action="?eg=mod"><input type="submit" name="eg_mod" value="latest"></form></td> </tr> </table> <!--</form>--> <table width="85%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td> <form method="POST"> <input type='hidden' name='start_m' value='<?=$start_m?>'> <input type='hidden' name='start_d' value='<?=$start_d?>'> <input type='hidden' name='start_y' value='<?=$start_y?>'> <input type='hidden' name='end_m' value='<?=$end_m?>'> <input type='hidden' name='end_d' value='<?=$end_d?>'> <input type='hidden' name='end_y' value='<?=$end_y?>'> <? if($_POST['report'] || $_GET['report']){ $stime = mktime(0,0,0,$start_m,$start_d,$start_y); $etime = mktime(23,59,59,$end_m,$end_d,$end_y); if($byip){ $sql = "SELECT * FROM images WHERE ipaddress='$byip'"; }else if($byuid){ $sql = "SELECT * FROM images WHERE user='$byuid'"; }else{ $sql = "SELECT * FROM images WHERE date >= $stime AND date <= $etime"; } $qr1 = mysql_query($sql); echo "total: ".mysql_num_rows($qr1)."<br>"; if($byip){ $purl = "imgman.php?report=1&byip=".$byip; }else{ $purl = "imgman.php?report=1&start_m=".$start_m."&start_d=".$start_d."&start_y=".$start_y."&end_m=".$end_m."&end_d=".$end_d."&end_y=".$end_y; } $rowcount = mysql_num_rows($qr1); $pagecount = ceil($rowcount / $limit); print "<table width=100%><td>images: " . ($pageno+1) ."</td><td align=right> <select onChange=\"gotocluster(this)\">\n <option>ÇÎÊÑ ÇáÕÝÍÉ</option>"; for($x=0; $x<$pagecount; $x++){ $p = $x + 1; $l = $x * $limit + 1; $u = $l + $limit - 1; if($u>$rowcount) $u=$rowcount; print "<option value='".$purl."&pageno=".$x."'>ÇáÕÝÍÉ $p ($l - $u)</option>\n"; } print "</select></td></table></form>"; echo "<form method='post' action='eg_del.php'> <input type='submit' value='delete'><br/><br/><a href='javascript:EgCheck();'>check</a> <table width='100%' border='1' cellspacing='4'><tr>"; $l = $pageno * $limit; $u = $l + $limit-1; $count = -1; $i = 1; $eg_count=1; $domCount = 0; while( $a = mysql_fetch_object($qr1) ){ $eg_time = date("Y/m/j h:i:s",$a->date); $count++; $row = ($count % 2)+1; if ($limit && $count < $l ) continue; if($limit && $count > $u) continue; $filen = $siteurl."/".str_replace('./', '', $att_path)."/".$a->filename; $filen = str_replace('http://','%%',$filen); $filen = str_replace('//','/',$filen); $filen = str_replace('%%','http://',$filen); //$thname = $a->thumb; $eg_explode = explode(".",$a->filename); $eg_ex = $eg_explode[1]; if(strtolower($eg_ex) == "jpg" || strtolower($eg_ex) == "gif" || strtolower($eg_ex) == "png" || strtolower($eg_ex) == "jpeg"){ echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='$filen' height=100 width=100 border=0></a><br>"; //$FName = $thname; //echo "<a href='$filen' target='_new'><img src='$filen' width=100 height=100 border=0></a><br>"; } else if(strtolower($eg_ex) == "doc") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../doc.gif' style='border-style: none;' width=50 height=50 border=0></a><br>"; } else if(strtolower($eg_ex) == "zip") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../zip.gif' style='border-style: none;' width=50 height=50 border=0></a><br>"; } else if(strtolower($eg_ex) == "txt") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../text.gif' style='border-style: none;' width=100 height=100 border=0></a><br>"; } else if(strtolower($eg_ex) == "swf") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../swf.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "mp3") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../mp3.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "avi") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../avi.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "wmv") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../wmv.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "mpg") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../mpg.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "pdf") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../pdf.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "mpeg") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../mpeg.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "ram") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../ram.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "rm") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../rm.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "wav") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../wav.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "gz") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../gzip.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "psd") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../psd.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "rar") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../rar.gif'></a><br>"; } else { echo "no image found<br>"; } if($a->user){ list($username) = mysql_fetch_array( mysql_query("SELECT username FROM users WHERE uid='".$a->user."'") ); echo " <b>ÇáãÇáß:</b> <a href='imgman.php?byuid=".$a->user."&report=1'>".$username."</a><br>"; } echo "<a href='imgman.php?byip=".$a->ipaddress."&report=1'>".$a->ipaddress."</a><br/>"; echo $eg_time."<br/>"; echo "<input type='checkbox' name='eg_array[]' value='$a->id' class='arr'>"; echo "</td>"; if ($eg_count == $eg_in_row){ echo "</tr><tr>"; $eg_count=0; } $eg_count++; } echo "</table></form>"; print "<table width=100%><td>images: " . ($pageno+1) ."</td><td align=right> <select onChange=\"gotocluster(this)\">\n <option>select</option>"; for($x=0; $x<$pagecount; $x++){ $p = $x + 1; $l = $x * $limit + 1; $u = $l + $limit - 1; if($u>$rowcount) $u=$rowcount; print "<option value='".$purl."&pageno=".$x."'>ÇáÕÝÍÉ $p ($l - $u)</option>\n"; } print "</select></td></table>"; }elseif($_GET['eg'] == "mod"){ $eg_sqlmod=mysql_query("select last_login from admin") or die (mysql_error()); $sqlmod=mysql_fetch_array($eg_sqlmod); // Paging ----------------------- if(!(isset($page))) { $page=1; } else { $page=$_GET['page']; } // Max_Per_Page $max=$eg_max; // from page to page $from=($max*$page)-$max; $paging=mysql_query("select id from images where date>='$sqlmod[last_login]'"); $nums=mysql_num_rows($paging); $pages=ceil($nums/$max); // -------------------------------- $sql="select * from images where date>='$sqlmod[last_login]' limit $from,$max"; $qr1 = mysql_query($sql); echo "<input type='submit' name='RenewDate' value='ÊÌÏíÏ ÊÇÑíÎ ÂÎÑ ÒíÇÑÉ'>"; //</form>"; echo "<form method='post' name='myf' action='eg_del.php'> <input type='submit' value='del'><br/><br/> <a href='javascript:EgCheck();'>ÊÍÏíÏ Çáßá</a> <table width='100%' border='1' cellspacing='4'><tr>"; $l = $pageno * $limit; $u = $l + $limit-1; $count = -1; $i = 1; $eg_count=1; $eg_a=0; $domCount = 0; while( $a = mysql_fetch_object($qr1) ){ $eg_time = date("Y/m/j h:i:s",$a->date); $count++; $row = ($count % 2)+1; if ($limit && $count < $l ) continue; if($limit && $count > $u) continue; $filen = $siteurl."/".str_replace('./', '', $att_path)."/".$a->filename; $filen = str_replace('http://','%%',$filen); $filen = str_replace('//','/',$filen); $filen = str_replace('%%','http://',$filen); //$thname = $a->thumb; $eg_explode = explode(".",$a->filename); $eg_ex = $eg_explode[1]; if(strtolower($eg_ex) == "jpg" || strtolower($eg_ex) == "gif" || strtolower($eg_ex) == "png" || strtolower($eg_ex) == "jpeg"){ // $FName = $thname; echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='$filen' width=100 height=100 border=0></a><br>"; } else if(strtolower($eg_ex) == "doc") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../doc.gif' style='border-style: none;' width=50 height=50 border=0></a><br>"; } else if(strtolower($eg_ex) == "zip") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../zip.gif' style='border-style: none;' width=50 height=50 border=0></a><br>"; } else if(strtolower($eg_ex) == "txt") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../text.gif' style='border-style: none;' width=100 height=100 border=0></a><br>"; } else if(strtolower($eg_ex) == "swf") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../swf.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "mp3") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../mp3.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "avi") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../avi.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "wmv") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../wmv.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "mpg") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../mpg.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "pdf") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../pdf.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "mpeg") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../mpeg.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "ram") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../ram.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "rm") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../rm.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "wav") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../wav.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "gz") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../gzip.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "psd") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../psd.gif' style='border-style: none;' border=0></a><br>"; } else if(strtolower($eg_ex) == "rar") { echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../rar.gif'></a><br>"; } else { echo "<td align='center'>"; echo "no image found<br>"; } /* echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../$filen' border=0></a><br>"; echo "<td align='center'>"; echo "<a href='$filen' target='_new'><img src='../$filen' border=0></a><br>";*/ if($a->user){ list($username) = mysql_fetch_array( mysql_query("SELECT username FROM users WHERE uid='".$a->user."'") ); echo " <b>ÇáãÇáß:</b> <a href='imgman.php?byuid=".$a->user."&report=1'>".$username."</a><br>"; } echo "<a href='imgman.php?byip=".$a->ipaddress."&report=1'>".$a->ipaddress."</a><br>"; echo $eg_time."<br/>"; echo "<input type='checkbox' name='eg_array[]' value='$a->id' class='arr'>"; echo "</td>"; if ($eg_count == $eg_in_row){ echo "</tr><tr>"; $eg_count=0; } $eg_count++; $eg_a++; } echo "</tr></table></form> <center>"; } // paging ---------------------------------------------------- for($i=1;$i<=$pages;$i++) { if($page==$i) { echo"[$i]"; } else { echo "<a href=".$PHP_SELF."?eg=mod&page=$i>[$i]</a> "; } } // ------------------------------------------------------------ ?> <!-- </form>--> </td> </tr> </table> <? include("siteadmin/footer.php"); ?>
  17. hi, i have a mysql table with 3 fields 1.id 2.time 3.approved values 1 1181237691 0 2 1181237703 0 3 1181237711 0 i want to fetch the distinct dates from this timestamp values using select statement. i want to display like this 1 2007-06-07 second thing i want to update the approved value=1 where these distinct dates are equal to the above timestamps any of your help will be surely appreciated. thanks mrjameer
  18. hi ToonMariner i have tested your code,but sorry nothing is displaying thanks mrjameer
  19. hi i have one mysql table which has 2 fields 1.id 2.message values 1 r%#dfont style="font-size: 8pt;"#i#j# WELCOME r%#d/fontb*%d i want to fetch this data and print it as WELCOME i want to replace r%#d with '<' and b*%d with '>' and ignore this #i#j#. i have used preg_replace but nothing is displaying.any of your help will be appreciated. thanks mrjameer
  20. hi, thanks for your reply.i have tested the code but nothing is displaying thanks mrjameer
  21. hi, i have a mysql table which has 3 fields 1.id 2.username 3.time values 1 abcd 1181027044 i want to fetch only those user id's and usernames whos time is equal to current date.any of your idea will be surely appreciated. thanks mrjameer
  22. hi Trium918, thanks a lot for posting the links. thanks mrjameer.
  23. hi thorpe, just i need some useful links,tutorials any thing, so that i can get some info about it,i dont need you to post the code. thanks mrjameer
  24. hi, can anybody help me. i want the php chat scripts.i make some searches but find a big one, i need a simple one.i need public chat system. the admin will type the message and press send button,the users who are logged at that time should see the admin message and give reply to him.all users can chat with admin.the messages will be stored in database.no private rooms.just chat messages only. thanks mrjameer.
  25. hi thanks for your response.esukf your code works fantastic..this is what i exactly want. thanks to all guys for the reply's mrjameer
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.