Jump to content

s4salman

Members
  • Posts

    84
  • Joined

  • Last visited

Everything posted by s4salman

  1. Hello i want to put adsense code into this: if (is_int($i / $cols)){ echo "<td width='180' align='center' style=\"border-style: dotted; border-width: 1\">$mybox</td></tr><tr>"; }else{ echo "<td width='180' align='center' style=\"border-style: dotted; border-width: 1\">$mybox</td>"; } if ( $i / $cols == 2) echo "<td colspan='3' align=\"center\"><!--here i want to put adsense ad code--></td></tr><tr>"; $i++; //end if }//end while i want to put this adsense code : <script type="text/javascript"><!-- google_ad_client = "pub-8599219576830682"; /* funxy forex 336x280, created 4/3/09 */ google_ad_slot = "4524729891"; google_ad_width = 336; google_ad_height = 280; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
  2. I am trying to create RSS using PHP but getting error message : Parse error: syntax error, unexpected $end in /home/hesla/public_html/rss.php on line 127 I am using this code. Please help me in this. <?php if (!ini_get("register_globals")) { import_request_variables('GPC'); } //&#1578;&#1608;&#1575;&#1601;&#1602; &#1606;&#1587;&#1582; &#1575;&#1604;&#1576;&#1610; &#1575;&#1578;&#1588; &#1576;&#1610; $phpver = phpversion(); if ($phpver < '4.1.0') { $_GET = $HTTP_GET_VARS; $_POST = $HTTP_POST_VARS; $_SERVER = $HTTP_SERVER_VARS; } $phpver = explode(".", $phpver); $phpver = "$phpver[0]$phpver[1]"; if ($phpver >= 41) { $PHP_SELF = $_SERVER['PHP_SELF']; } $dbhost="localhost"; $dbusername="user"; $dbpassword="password"; $dbname="hesla_test"; //Before you can perform any operation on a database you must connect to the MySQL server. The syntax for performing this operation is simple: $connect = mysql_connect($dbhost, $dbusername, $dbpassword); mysql_select_db($dbname,$connect) or die ("Could not select database"); $result = mysql_query("SELECT * FROM 3gp LIMIT 10 ORDER BY id ",$connect); while($r = mysql_fetch_assoc($result)) { //the format is $variable = $r["nameofmysqlcolumn"]; //modify these to match your mysql table columns $id=$r["id"]; $name=$r["name"]; $details=$r["details"]; $url=$r["url"]; $image=$r["image"]; $embede=$r["embede"]; $mirrorimg=$r["mirrorimg"]; $mirror3gp=$r["mirror3gp"]; ?> <rss version="2.0"> <channel> <title>3GP VIDEOS</title> <link>http://funxy.com</link> <description>Latest 3GP Videos</description> <language>en-us</language> <copyright>Copy Right Resereved 2009-10</copyright> <image> <url>http://www.funxy.com/images/Untitled-1_01.gif</url> <title>Latest 3GP Videos @ Funxy.Com</title> <link>http://funxy.com</link> <width>114</width> <height>54</height> </image> <item> <title><?php echo "$name"; ?></title> <link><?php echo "http://funxy.com/beta/3gp-downloads$id.html"; ?></link> <description><?php echo "$details"; ?> </description> </item> </channel> </rss>
  3. I want to insert a 468x60 size banner after printing 2nd row using php. Currently 5 rows get printed on each page. Please help Following is the script: <?php class Pager { function getPagerData($numHits, $limit, $page) { $numHits = (int) $numHits; $limit = max((int) $limit, 1); $page = (int) $page; $numPages = ceil($numHits / $limit); $page = max($page, 1); $page = min($page, $numPages); $offset = ($page - 1) * $limit; $ret = new stdClass; $ret->offset = $offset; $ret->limit = $limit; $ret->numPages = $numPages; $ret->page = $page; return $ret; } } // get the pager input values $page = $_GET['page']; $limit = 15; $result = mysql_query("select count(*) from 3gp"); $total = mysql_result($result, 0, 0); // work out the pager values $pager = Pager::getPagerData($total, $limit, $page); $offset = $pager->offset; $limit = $pager->limit; $page = $pager->page; // use pager values to fetch data $query = "select * from 3gp order by id DESC limit $offset, $limit"; $result = mysql_query($query); // use $result here to output page content //my addition //grab all the content //Custom Table Stsrt// $cols = 3; //number of coloms $i =1; echo "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\" width=\"100%\" id=\"table1\" bordercolor=\"#E2E2E2\" bgcolor=\"#E2E2E2\">" ."<tr>"; while($r=mysql_fetch_array($result)) { //the format is $variable = $r["nameofmysqlcolumn"]; //modify these to match your mysql table columns $id=$r["id"]; $name=$r["name"]; $details=$r["details"]; $url=$r["url"]; $image=$r["image"]; $mirririmg=$r["mirrorimg"]; $mirror3gp=$r["mirror3gp"]; //display the row $mybox = "$name <br> <img src='$image' width =\"90\" height =\"90\"> <br> <a href='http://funxy.com/beta/3gp-download$id.html' class=\"classb\">Download This 3GP Video !</a> <br>"; if (is_int($i / $cols)){ echo "<td width='180' align='center' style=\"border-style: dotted; border-width: 1\">$mybox</td></tr><tr>"; }else{ echo "<td width='180' align='center' style=\"border-style: dotted; border-width: 1\">$mybox</td>"; } $i++; //end if }//end while echo "</tr></table>"; //Custom Table End// //ends my addition // output paging system (could also do it before we output the page content) if ($page == 1) // this is the first page - there is no previous page echo "Previous"; else // not the first page, link to the previous page echo "<a href=\"http://funxy.com/beta/3gp-videos-" . ($page - 1) . ".html\" id=\"navigationURL\">Previous</a>"; for ($i = 1; $i <= $pager->numPages; $i++) { echo " | "; if ($i == $pager->page) echo " $i"; else echo "<a href=\"http://funxy.com/beta/3gp-videos-$i.html\" id=\"navigationURL\"> $i</a>"; } if ($page == $pager->numPages) // this is the last page - there is no next page echo "Next"; else // not the last page, link to the next page echo " <a href=\"http://funxy.com/beta/3gp-videos-" . ($page + 1) . ".html\" id=\"navigationURL\">Next</a>"; ?>
  4. I read about AJAX , but could not got a solution to this.
  5. Hello i am using this code to print different babes wallpapers links : <?php $query="SELECT * FROM cattable ORDER by catname"; $result=mysql_query($query); $num=mysql_numrows($result); echo "<b><center>Wallpapers</center></b><br>"; $i=0; while ($i < $num) { $catname=mysql_result($result,$i,"catname"); $caturl=mysql_result($result,$i,"caturl"); echo "<b><a href=\"$caturl-wallpapers\" class=\"classb\">$catname</a></b><br>"; $i++; } ?> But what i now want is to put them in a Main item called "Babes Wallpapers" in such a way that when we click "Babes Wallpapers" , a sub menu open up with list of celebrities wallpapers as i am currently displaying using the above php code. For your nderstanding, visit wallpaperstock.net, and in the category colum on the right side of the page, click Hot Babes/ Girls link, and you will find that a long list dropped down. I want the same thing. Can any body tell me how can i do this.
  6. same problem. see this at http://wallpapersfreak.com/freaky/index2.php
  7. Dear see this file at here : http://wallpapersfreak.com/freaky/index2.php it messed up whole web site deisgn. and the center is what i want in this format. http://wallpapersfreak.com/freaky/index.php please help thanks
  8. Dear plz see the attcahed file and help me in this. thanks [attachment deleted by admin]
  9. dear why it is displaying 1of 15 pages while i have records to show on only 2 pages.
  10. Dear thanks, see this in action at : http://wallpapersfreak.com/freaky/index2.php?page=1
  11. This is the whole script : <?php if (!ini_get("register_globals")) { import_request_variables('GPC'); } //E?C?? ??I C?E? CEO E? $phpver = phpversion(); if ($phpver < '4.1.0') { $_GET = $HTTP_GET_VARS; $_POST = $HTTP_POST_VARS; $_SERVER = $HTTP_SERVER_VARS; } $phpver = explode(".", $phpver); $phpver = "$phpver[0]$phpver[1]"; if ($phpver >= 41) { $PHP_SELF = $_SERVER['PHP_SELF']; } class Pager { function getPagerData($numHits, $limit, $page) { $numHits = (int) $numHits; $limit = max((int) $limit, 1); $page = (int) $page; $numPages = ceil($numHits / $limit); $page = max($page, 1); $page = min($page, $numPages); $offset = ($page - 1) * $limit; $ret = new stdClass; $ret->offset = $offset; $ret->limit = $limit; $ret->numPages = $numPages; $ret->page = $page; return $ret; } } // get the pager input values $page = $_GET['page']; $limit = 16; $result = mysql_query("select count(*) from ratings"); $total = mysql_result($result, 0, 0); // work out the pager values $pager = Pager::getPagerData($total, $limit, $page); $offset = $pager->offset; $limit = $pager->limit; $page = $pager->page; // use pager values to fetch data $query = "select * from ratings order by id DESC limit $offset, $limit"; $result = mysql_query($query); // use $result here to output page content //my addition //grab all the content //Custom Table Stsrt// $cols = 4; //number of coloms $i =1; echo "<table border=\"1\" cellpadding=\"4\" cellspacing=\"4\" width=\"95%\" id=\"table1\" bordercolor=\"#ffffff\" bgcolor=\"#ffffff\" style=\"border-collapse: collapse; border-style: double; border-width: 1\">" ."<tr>"; while($r=mysql_fetch_array($result)) { //the format is $variable = $r["nameofmysqlcolumn"]; //modify these to match your mysql table columns $id=$r["id"]; $name=$r["name"]; $image=$r["image"]; //display the row $mybox = " <br> <a href='view.php?id=$id'><img src='http://wallpapersfreak.com/freaky/1600x1200/images/sml120_$image' width =\"120\" height =\"90\" style=\"border: 2px double #824149;\"></a> <br> <a href='view.php?id=$id'>$name</a> <br>"; if (is_int($i / $cols)){ echo "<td width='150' align='center'>$mybox</td></tr><tr>"; }else{ echo "<td width='150' align='center'>$mybox</td>"; } $i++; //end if }//end while echo "</tr></table>"; //Custom Table End// //ends my addition // output paging system (could also do it before we output the page content) if ($page == 1) // this is the first page - there is no previous page echo "Previous"; else // not the first page, link to the previous page echo "<a href=\"index.php?page=" . ($page - 1) . "\" id=\"navigationURL\">Previous</a>"; for ($i = 1; $i <= $pager->numPages; $i++) { echo " | "; if ($i == $pager->page) echo "<span class=\"wp-pagenavi\">$i</span>" ; else echo "<a href=\"index.php?page=$i\" id=\"navigationURL\"> $i</a>"; } if ($page == $pager->numPages) // this is the last page - there is no next page echo "Next"; else // not the last page, link to the next page echo " <a href=\"index.php?page=" . ($page + 1) . "\" id=\"navigationURL\">Next</a>"; ?>
  12. i m using this php code for pagination navigation : // output paging system (could also do it before we output the page content) if ($page == 1) // this is the first page - there is no previous page echo "Previous"; else // not the first page, link to the previous page echo "<a href=\"index.php?page=" . ($page - 1) . "\" id=\"navigationURL\">Previous</a>"; for ($i = 1; $i <= $pager->numPages; $i++) { echo " | "; if ($i == $pager->page) echo "<span class=\"wp-pagenavi\">$i</span>" ; else echo "<a href=\"index.php?page=$i\" id=\"navigationURL\"> $i</a>"; } if ($page == $pager->numPages) // this is the last page - there is no next page echo "Next"; else // not the last page, link to the next page echo " <a href=\"index.php?page=" . ($page + 1) . "\" id=\"navigationURL\">Next</a>"; but i want to display navigation like at the bottom of http://masalanews.net/ i tried css, but could not make it work.please anyone can help me out in this.
  13. Actually i was talking about this : http://fun007.com/video.php?id=304 see the random funny video table in the center of the web page layout. i want to make that kind of table using above similar code because it is simple to undertsand for me.
  14. Dear i m newbie in css. I learnt somewhere to use external style sheet. i want to set web page body color, font size, font color, link color ( for links on black background) and link color 2 ( for links on white background color). can any body tell me how to write this in css.
  15. I use following code to print records from mysql table. but i want to display 5 records in one row. then next 5 records in 2nd row and so on. How this code will be changed. i m trying but all going wrong making me confused. Can any one help me? <table border="0" cellspacing="2" cellpadding="2"> <tr> <th><font face="Arial, Helvetica, sans-serif">Name</font></th> <th><font face="Arial, Helvetica, sans-serif">Phone</font></th> <th><font face="Arial, Helvetica, sans-serif">Mobile</font></th> <th><font face="Arial, Helvetica, sans-serif">Fax</font></th> <th><font face="Arial, Helvetica, sans-serif">E-mail</font></th> <th><font face="Arial, Helvetica, sans-serif">Website</font></th> </tr> <? $i=0; while ($i < $num) { $first=mysql_result($result,$i,"first"); $last=mysql_result($result,$i,"last"); $phone=mysql_result($result,$i,"phone"); $mobile=mysql_result($result,$i,"mobile"); $fax=mysql_result($result,$i,"fax"); $email=mysql_result($result,$i,"email"); $web=mysql_result($result,$i,"web"); ?> <tr> <td><font face="Arial, Helvetica, sans-serif"><? echo $first." ".$last; ?></font></td> <td><font face="Arial, Helvetica, sans-serif"><? echo $phone; ?></font></td> <td><font face="Arial, Helvetica, sans-serif"><? echo $mobile; ?></font></td> <td><font face="Arial, Helvetica, sans-serif"><? echo $fax; ?></font></td> <td><font face="Arial, Helvetica, sans-serif"><a href="mailto:<? echo $email; ?>">E-mail</a></font></td> <td><font face="Arial, Helvetica, sans-serif"><a href="<? echo $web; ?>">Website</a></font></td> </tr> <? $i++; } echo "</table>";
  16. Dear what is the meaning of this : $row = array_diff ( $row, array ( 'no' ) );
  17. Dear when i added this code : list($width, $height) = getimagesize($file) ; $modwidth = 640; $diff = $width / $modwidth; $modheight = $height / $diff; $tn = imagecreatetruecolor($modwidth, $modheight) ; $image = imagecreatefromjpeg($file) ; imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height) ; imagejpeg($tn, $save, 100) ; [code] it is now only generating 640x480 size image.and original file is uploading. it is not generating 800x600 size image.
  18. Dear printf why you have used $wallpaper = 23; in the above code.
  19. Hello i have fields named "w1" , "w2" , "w3" , "w4" , "w5 " , "w6" in mysql table. These field have data like : "yes" or "no" i want to print record only if fields have "yes". for example if "w1" has "yes" and "w2" has "yes" but "w3" , "w4" , "w5", "w6" have "no". only w1 and w2 should be printed and w3,w4,w5,w6 should not printed. I am actually using this for wallpaper sizes like : 640x480 , 800x600 , 1024x768, 1152x864 , 1600x1200 , 1280x1024 sizes wallpaper.w1, w2, w3, w4, w5, w6 are for these sizes. if a wallpaper is just for 800x600(w1) and 1024x768(w2) size , then only print a link to download wallpaper of these two sizes and not of others. And if wallpaper is available for all sizes, print the links to all.You can see what i mean at this URL : http://wallpaperscript.com/demo/yoseminte-wallpapers.html Here the wallpaper is available to download for just 3 sizes.So the site just printed 3links. But at http://desktop-wallpapers.ro/perfect_strawberry-wallpapers.html wallpaper is available in 5 different pixels, so 5 links have been printed. Can any body help me how to do this. i save field data in this manner : $w1 = $first=mysql_result($result,"first"); and so on. I just know that we can do this using if... else statement. but not sure how to do this. Can anyone help me out.
  20. Landavia, i did not got your point.
  21. Dear i am using the script attcahed, i have some photos in 1600x1200 size. When i craete thumbnails using this script, it uploads 1600x1200 size image on the server. Also it craetes 1024x768 and 800x600 size dynamically. But i also want to create 640x480 pixel image. How can i do this.What additional code in need to put in it. Please help [attachment deleted by admin]
  22. Should i put ad code like this: //put banner in a row here echo "</tr><ad code><tr>";
×
×
  • 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.