Jump to content

pspfreak101

Members
  • Posts

    36
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

pspfreak101's Achievements

Member

Member (2/5)

0

Reputation

  1. Thank you, this worked perfectly
  2. Ok I'm not sure how to approach this one I want to swap the value thats in a span in put it in a text field. My regex /<span>.+[0-9]<\/span>/g Example: My data looks like this <span class="SomeClass"> <span>5000</span> </span> I want to remove the span and have the value in a text field like this <input type="text" name="score" value="5000" />
  3. I wanna make my code more browser friendly as it only works on firefox 3 and is not very sufficient so can you please tell me some changes I need to make. heres the live demo www.hackingclan.com/leetdesigns Index <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Leet Designs</title> <link href="style.css" rel="stylesheet" type="text/css" /> <!-- jcarousel --> <script type="text/javascript" src="jscript/lib/jquery-1.2.3.pack.js"></script> <script type="text/javascript" src="jscript/lib/jquery.jcarousel.pack.js"></script> <link rel="stylesheet" type="text/css" href="jscript/lib/jquery.jcarousel.css" /> <link rel="stylesheet" type="text/css" href="jscript/skin/skin.css" /> <script type="text/javascript"> jQuery(document).ready(function() { jQuery('#mycarousel').jcarousel({ // Configuration goes here }); }); </script> <!-- jcarousel --> </head> <body> <div id="Wrapper"> <div id="content-wrapper"> <div id="logo"></div> <ul id="nav"> <li id="nav-01"><a href="index.php"><span>Home</span></a></li> <li id="nav-divder"></li> <li id="nav-02"><a href="index.php?action=about"><span>About</span></a></li> <li id="nav-divder"></li> <li id="nav-03"><a href="index.php?action=templates"><span>Templates</span></a></li> <li id="nav-divder"></li> <li id="nav-04"><a href="index.php?action=services"><span>Services</span></a></li> <li id="nav-divder"></li> <li id="nav-05"><a href="index.php?action=mydesigns"><span>My Designs</span></a></li> <li id="nav-divder"></li> <li id="nav-06"><a href="index.php?action=register"><span>Register</span></a></li> <li id="nav-divder"></li> <li id="nav-07"><a href="index.php?action=contact"><span>Contact</span></a></li> </ul> <div id="edge-right"></div> <div id="edge-left"></div> <div id="inner"> <div id="inner-body"> <p class="welcome">Weclome to Leet Designs</p> <p class="statement">Our goal is to bring you modern templates</p> <p class="statement">at the cheapest price on the web</p> <center> <div class="jcarousel-skin-tango"> <div class="jcarousel-container"> <div disabled="disabled" class="jcarousel-prev jcarousel-prev-disabled"></div> <div class="jcarousel-next"></div> <div class="jcarousel-clip"> <ul id="mycarousel" class="jcarousel-skin-tango"> <li><img src="images/appwarez.jpg" width="249" height="204" alt="" /></li> <li><img src="images/playstation.jpg" width="249" height="204" alt="" /></li> <li><img src="images/killzone2.jpg" width="249" height="204" alt="" /></li> <li><img src="images/appwarez.jpg" width="249" height="204" alt="" /></li> <li><img src="images/playstation.jpg" width="249" height="204" alt="" /></li> <li><img src="images/killzone2.jpg" width="249" height="204" alt="" /></li> </ul> </div> </div> </div> </center> <table width="644" height="108" border="0" cellpadding="0" cellspacing="0" class="bottom-content"> <tr> <td width="174"> </td> <td width="14"><div id="bottomdivder"></div></td> <td width="177"><p>Latest News:</p> <p>Site is in early development expect some major changes</p> <p> </p></td> <td width="21"><div id="bottomdivder"></div></td> <td width="255"><p>Project News:</p> <p>My latest project is Appwarez a full php site with its own cms system that will power on through the rest of the sites I make.</p></td> <td width="31"><div id="bottomdivder"></div></td> </tr> </table> <div class="note" id="note"> <p class="note-p">Note:</p> <p class="note-p">Good with photoshop, html, php join the team and make profits off your own templates now</p> </div> <div id="bottom"> <table width="907" height="338" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="286"> </td> <td width="286"> </td> <td width="304"> </td> </tr> <tr> <td height="172"> </td> <td> </td> <td> </td> </tr> </table> </div> </div><!-- Inner-Body --> </div><!-- Inner --> </div><!-- Content-wrapper --> <div id="footer"> <div align="center" class="footer-text">Leet Designs ⓒ 2008 All Rights Reserved</div> </div><!-- Footer--> </div><!-- wrapper --> </body> </html> Css @charset "utf-8"; /* *Copyright of Leet Designs */ Body { font-family: 'Trebuchet MS', Arial, Verdana, Helvetica, sans-serif; font-size: 12px; color: #f0f0f0; margin:0; padding:0; background-color:#353535; } .statement { font-family: 'Trebuchet MS', Arial, Verdana, Helvetica, sans-serif; font-size: 12px; color: #f0f0f0; text-indent:5px; margin:0; padding:0; } .welcome { text-indent:5px; } #Wrapper { width: 1000px; height: auto; height: 100%; min-height: 100%; margin:auto; } #content-wrapper { width:1000px; height:1027px; } #logo { background:url(images/logo.png) no-repeat; height:63px; width:207px; margin-left:20px; margin-top:30px; margin-bottom:10px; padding:0; } /** NAVAGATION **/ #nav { background: #d61313; height:51px; width:999px; margin:0; padding-top:2px; padding-left:0; padding-bottom:0; padding-right:0; position:relative; } #nav span { display: none; } #nav li, #nav a { height:51px; display:block; } #nav li { float:left; list-style:none; display:inline; } #nav-divder { background:url("images/divider.gif") no-repeat; height:51px; width:2px; } #nav-01 { background:url("images/Home.png") no-repeat; width:141px; height:49px; } #nav-02 { background:url("images/About.png") no-repeat; height:49px; width: 141px; } #nav-03 { background:url("images/Templates.png") no-repeat; height:49px; width: 141px; } #nav-04 { background:url("images/Services.png") no-repeat; height:49px; width: 141px; } #nav-05 { background:url("images/Mydesigns.png") no-repeat; height:49px; width: 141px; } #nav-06 { background:url("images/Register.png") no-repeat; height:49px; width: 141px; } #nav-07 { background:url("images/Contact.png") no-repeat; height:49px; width: 141px; } #nav-01 a:hover {background:url("images/Home.png") 0px -49px no-repeat; } #nav-02 a:hover {background:url("images/About.png") 0px -49px no-repeat; } #nav-03 a:hover {background:url("images/Templates.png") 0px -49px no-repeat; } #nav-04 a:hover {background:url("images/Services.png") 0px -49px no-repeat; } #nav-05 a:hover {background:url("images/Mydesigns.png") 0px -49px no-repeat; } #nav-06 a:hover {background:url("images/Register.png") 0px -49px no-repeat; } #nav-07 a:hover {background:url("images/Contact.png") 0px -49px no-repeat; } /** END NAVAGATION **/ #edge-left { background:#414141 url(images/lines.gif) repeat-y; height:898px; width:12px; float:left; } #edge-right { background:#414141 url(images/lines.gif) repeat-y; height:898px; width:12px; float:right; } #inner-wrapper { height:509px; width:1000px; margin:0; padding:0; } #inner{ background:#3f3e3e; height:509px; width:950px; margin-left:18px; margin-top:10px; padding:5px; } .inner-header { background:#464545; height:34px; } #inner-body { height:503px; width:944px; border-style:solid; border-color:#353535; } #bottomdivder { background:#434343; height:108px; width:4px; } #note { background:url(images/note.png) no-repeat; height:254px; width:289px; padding:40px; z-index:2; } .note-p { color:#000000; height:15px; width:170px; } .bottom-content { float:right; } #bottom { background:#3f3e3e; height:338px; width:950px; z-index:1; margin-top:-108px; } #bottom-box1 { height:30px; width:90px; margin-left:94px; margin-top:-80px; } #bottom-box-divider { background:#434343; height:321px; width:4px; margin-top:6px; } .firefox-img { width:75px; height:74px; margin-left:10px; margin-top:-70px; } .photoshop-img { width:76px; height:75px; margin-left:10px; } #footer { background:url(images/stripes.png) repeat-x; height:97px; width:auto; margin:0; } .footer-text { margin-top:50px; margin-left:360px; position:absolute; }
  4. I'm following this tutorial http://elouai.com/users.php I used same table structure as this did
  5. I'm working on a users online script but it doesn't show the ip address in the database only has the time stamp I have things setup like this, the usersonline.php is required in the header.php which contains the connection and displays the users online. How can I make it so that it adds their ip address to the database? Usersonline.php <?php // Configuration $timeoutseconds = 1100; // 10 minutes $timestamp=time(); $timeout=$timestamp-$timeoutseconds; $ip = substr($REMOTE_ADDR, 0, strrpos($REMOTE_ADDR,".")); $loopcap = 0; while ($loopcap<3 && @mysql_query("insert into useronline values('$timestamp','$ip','$PHP_SELF')")) { // in case of collision $timestamp = $timestamp+$ip{0}; $loopcap++; } @mysql_query("delete from useronline where timestamp<$timeout"); $result = @mysql_query("select distinct ip from useronline"); $user = @mysql_num_rows($result); mysql_free_result($result); ?>
  6. what you mean something like this echo "<A HREF='http://link.com'>$varible</a>"; or $varible '<A HREF='http://link.com'>link</a>';
  7. I'm trying to build my downloads section now. What is on the submit form is Title, username, catagory, description and download link. Currently this is all in one table. When you visit the downloads I want their to be the list of categorys and then the user clicks what ever category they want and then shows the list a titles in that category. For example Downloads -> Pc Games -> Team fortress 2 , Call of duty 4, so on an on Now my question is how can I make it so when they submit a entire and select the category it goes into the database but displays in the downloads under that category instead of makeing a table for each category or would that be the best way of doing it?
  8. Sorry if I didn't explain well but I switched it from to to $result and still gives me Title: Uploaded By: Descrip: Delete Approve Click here to return emtpy.... so its not the blank query, would it change from a row to a column using the WHERE ID?
  9. I can't figure out why its not displaying should be grabbing from row of the id number and displaying it or do I need to add something else to it? <?php //**************************************** //AppWarez 2008// //**************************************** require('connection.php'); require('header.php'); $id = $_GET['id']; ?> <div id="Main"> <? //delete entrie if ($_GET['id']) { if ($row["admin"] == "1") { $query = "SELECT * FROM downloads " . "WHERE ID=$id"; $app = $row["app"]; $uploadby = $row["uploadby"]; $decrip = $row["descrip"]; $result = mysql_query($query); if(!$result) { echo "Your query failed. " . mysql_error(); } else { echo("<P>Title: $app<br>" . "Uploaded By: $uploadby<br>" . "Descrip: $descrip<br>" . "<A HREF='entriedelete.php?id=$id'>" . "Delete</A> " . " <A HREF='entrieapprove.php?id=$id'>" . " Approve </A></P>"); } } } ?> <br /> <p><a href=index.php?action=admin> Click here to return</a></p> </div> </div> </div>
  10. Well from the purple boxes on my site everything looks good on firefox but on ie its really F*cked up. Anyways when you click on say the login button it puts a purple dotted box around I've pretty much tried everything like border = 0 and a.dotted-border {display:none;} but nothing has worked also only on firefox does the login box go under the logo than over it. Heres a demo of the site http://www.hackingclan.com/Appwarez2/index.php
  11. Well whats not happening is that if (@$_GET['deletenews'] == '$newsid') { is not matching up with the request so its not preforming the delete and just need to know exactly how to make it preform the query heres my updated code if (@$_GET['action'] == 'editn') { if ($row["admin"] == "1") { echo("<center<P>Current News</P></center>"); $result = mysql_query( "SELECT ID, body FROM news"); if (!$result) { echo("<P>Error performing query: " . mysql_error() . "</P>"); exit(); } while ( $row = mysql_fetch_array($result) ) { $newsid = $row["ID"]; $newstext = $row["body"]; echo("<P>$newstext " . "<A HREF='$PHP_SELF?deletenews=$newsid'>" . "Delete</A></P>"); } }//end admin }//end edit //Delet news if (@$_GET['deletenews'] == '$newsid') { if ($row["admin"] == "1") { $sql = "DELETE FROM news " . "WHERE ID=$deletenews"; if (mysql_query($sql)) { echo("<P>The news has been deleted.</P>"); } else { echo("<P>Error deleting news: " . mysql_error() . "</P>"); } } }
  12. No I don't have anything like that even if I have it like this if ($_GET['deletenews']) { still doesn't work heres my whole admin snipit /////////////////////////////////Admin\\\\\\\\\\\\\\\\\\\ if (@$_GET['action'] == 'admin') { $loggedin = false; if ($row["admin"] == "1") { $loggedin = true; } else { echo "Please login to access the Administration Panel"; } }//end action if ($loggedin == true) { echo "Welcome <b>" . $_SESSION['username'] ." </b> the to Administration Panel"; echo "<li><a href=\"index.php?action=editd\">Edit Download Entries</a></li>\n"; echo "<li><a href=\"index.php?action=editm\">Edit Members</a></li>\n"; echo "<li><a href=\"index.php?action=editn\">Edit News</a></li>\n"; echo "<li><a href=\"index.php?action=submitn\">Submit News</a></li>\n"; echo "<li><a href=\"index.php?action=dapprove\">Approve Download Entries</a></li>\n"; } //end loggedin if (@$_GET['action'] == 'dapprove') { if ($row["admin"] == "1") { $sql = "select count(approve) as totals from downloads group by approve"; $result = mysql_query($sql); $unapproved = mysql_result($result, 0, 'totals'); $approved = mysql_result($result, 1, 'totals'); if(empty($unapproved)) { $unapproved = 0; } echo "Their are ". $approved ." approved entries<br>"; echo "". $unapproved ." waiting for approval<br>"; }//end }//End admin //Delet news if (isset($deletenews)) { if ($row["admin"] == "1") { $sql = "DELETE FROM news " . "WHERE ID=$deletenews"; if (mysql_query($sql)) { echo("<P>The news has been deleted.</P>"); } else { echo("<P>Error deleting news: " . mysql_error() . "</P>"); } } } if (@$_GET['action'] == 'editn') { if ($row["admin"] == "1") { echo("<center<P>Current News</P></center>"); $result = mysql_query( "SELECT ID, body FROM news"); if (!$result) { echo("<P>Error performing query: " . mysql_error() . "</P>"); exit(); } while ( $row = mysql_fetch_array($result) ) { $newsid = $row["ID"]; $newstext = $row["body"]; echo("<P>$newstext " . "<A HREF='$PHP_SELF?deletenews=$newsid'>" . "Delete</A></P>"); } }//end admin }//end edit ///////Submit News\\\\\\\\\\\ if (@$_GET['action'] == 'submitn') { if ($row["admin"] == "1") { echo "<div align=\"center\" class=\"style1\">Submit News</div>\n"; echo "<form name=\"form1\" method=\"post\" action=\"index.php\">\n"; echo "Title:<input type=\"text\" name=\"title\" id=\"title\"><br />\n"; echo "Author: <b>" . $_SESSION['username'] . "</b> <br />\n"; echo "<label>Body\n"; echo "<textarea name=\"body\" id=\"body\" cols=\"50\" rows=\"8\" ></textarea></label>\n"; echo "<br />\n"; echo "<center><input type=\"Submit\" name=\"submitn\" id=\"submitn\" value=\"submit\"></center>\n"; echo "</form>\n"; } } //News Submit if (@$_POST["submitn"] ) { // Check if a person has filled every form. if(empty($_POST['title']) || empty($_POST['body'])) { echo "You have to fill in everything in the form."; exit; }// end check $title = $_POST['title']; $body = $_POST['body']; $author = $_SESSION['username']; $query = "INSERT INTO `news` (title, body, author, date) VALUES ('$title', '$body', '$author','date=now()')"; // Perform the SQL query on the database. $result = mysql_query($query); // If the query failed, display an error. if(!$result) { // The dot seperates PHP code and plain text. echo "Your query failed. " . mysql_error(); } else { // Display a success message! echo "Your news has been posted" . $_SESSION['username'] . " <a href=index.php> Click here to return</a>"; } }//end submit ?>
×
×
  • 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.