Jump to content

Mod-Jay

Members
  • Posts

    155
  • Joined

  • Last visited

    Never

Everything posted by Mod-Jay

  1. I dont know what that is, And yes i want it that way
  2. I'm trying to make a index page to list all files and directorys, that loads the folders into another page, as if you were on a page with no index. I have the following code that did work out so well but its sorta close to what i am trying to do. <?php $dir = "../toplist/"; $files = glob($dir . '*', GLOB_NOSORT); foreach ($files as $file) { echo"<a href='$file'>$file</a><br>"; } ?>
  3. Highslide does indeed work. EDIT: found your problem, you had <?php echo $dir . $img; ?>, it needed to be <?php echo $img; ?> cause you already echo'd "$dir" in images.
  4. The thumbnails show but the pictures do not. Thank you.
  5. Hey, I dont know whats wrong but i was hoping someone could take a look at the code and provide some errors that maybe causing this script not to work. I want it to display all the .jpg pictures in thumbnails, it currently does not even get the pictures. code: <?php $pic_listing = mysql_query("SELECT * FROM toplist WHERE id='". $id ."'") or die(mysql_error()); while($serverpic = mysql_fetch_array($pic_listing)) { $servername = $serverpic["servername"]; } $directory = "images/serverpic/" . $servername . ""; $images = glob("" . $directory . "*.jpg"); if(empty($images)) { ?> <div class="highslide-gallery"> <?php foreach($images as $image) { ?> <a href="images/serverpic/<?php echo $servername . "/" . $image; ?>" class="highslide" onclick="return hs.expand(this)"> <img src="images/serverpic/<?php echo $servername . "/" . $image; ?>" alt="Highslide JS" width="100" height="100" title="Click to enlarge" /> </a> <div class="highslide-caption"> <?php } ?> </div> </div> <?php } ?>
  6. I have no idea whats wrong with this. I'm trying to make it so i can collect all the .jpg images in a the $servername's folder to display as a thumbnail set up with javascript and css. <?php if(!empty($images)) { ?> <div class="highslide-gallery"> <?php $pic_listing = mysql_query("SELECT * FROM toplist WHERE id='". $id ."'") or die(mysql_error()); while($serverpic = mysql_fetch_array($pic_listing)) { // $picture1 = $serverpic["picture1"]; // $picture1info = $serverpic["picture1info"]; $servername = $serverpic["servername"]; } $directory = "images/serverpic/" . $servername . ""; $images = glob("" . $directory . "*.jpg"); foreach($images as $image) { ?> <a href="images/serverpic/<?php echo $servername . "/" . $image; ?>" class="highslide" onclick="return hs.expand(this)"> <img src="images/serverpic/<?php echo $servername . "/" . $image; ?>" alt="Highslide JS" width="100" height="100" title="Click to enlarge" /> </a> <div class="highslide-caption"> <?php } // echo $picture1info; ?> </div> <?php ?> </div> <?php } ?>
  7. Thanks for trying everyone, but i fixed the error.
  8. Heres the whole page: <?php if($_GET['serv'] == "add") { ?> <div class="usercp_body"><!-- UserCP Notification Manage Start --> <div id="dash_chart" class="portlet" style="width:100%;margin: 0 auto;"> <div class="portlet-header"> <h4><center>All Servers For <?php echo $username; ?></center></h4> </div> <div class="portlet-content"> <form action="manage.php?serv=del&id=<?php echo $serverid; ?>&del=true" method="post"> <input type="button" class="bgbtn blue" value="Yes" name="true" /> <input type="button" class="bg-btn blue" value="No" name="false" /> </form> </div> </div> <?php } $server_a = mysql_query('SELECT * FROM toplist WHERE userid="'. $_SESSION['id'] .'" ORDER BY id DESC') or die(mysql_error()); $serverid = 0; if($_GET['serv'] == "manage") { ?> <div class="usercp_body"><!-- UserCP Notification Manage Start --> <div id="dash_chart" class="notifications" style="width:100%;margin: 0 auto;"> <div class="notifications-header"> <h4><center>All Servers For <?php echo $username; ?></center></h4> <div class="name"> <table border="0"> <tr> <td style="width:7%;">Manage</td> <td style="width:7%;">Premium</td> <td style="width:5%;">Banned</td> <td style="width:20%;">Server Name</td> <td style="width:20%;">Server Host</td> <td style="width:10%;">Server Port</td> <td style="width:10%;">Date Made</td> </tr> </table> </div> </div> <div class="notifications-content"> <table cellspacing="0"> <tbody> <?php if(mysql_num_rows($server_a) == 0) { ?> <tr class="table"> <td class="name">You have not registered a server yet. <a href="index.php?serv=add">Click here</a> to register one!</td> <td class="revision"></td> <td class="votes"></td> </tr> <?php } else { ?> <?php While($server_b = mysql_fetch_array($server_a)) { $serverid = $server_b['id']; $servername = $server_b['servername']; $banned = $server_b['ban']; $datemade = $server_b['added']; $premium = $server_b['premium']; $serverhost = $server_b['serverhost']; $serverport = $server_b['serverport']; ?> <tr class="table"> <td width="7%"> <a href="index.php?serv=del&id=<?php echo $serverid; ?>"><img src="../images/usercp/invalid.gif" /></a> <a href="index.php?serv=edit&id=<?php echo $serverid; ?>"><img src="../images/usercp/edit.gif" /></a> </td> <td width="7%"><?php if($premium == 1) { echo"<font color='green'>Yes</font>"; } else { echo"<font color='red'>No</font>"; } ?></td> <td width="5%"><?php if(!$ban == 1){ echo "<img src=\"../images/usercp/invalid.gif\" />"; } else { echo "<img src=\"../images/usercp/unbanned.gif\" />"; } ?></td> <td width="20%"><a href="<?php if($premium == 1) { echo "viewserver-prem-". $serverid .".html"; } else { echo "viewserver-regular-". $serverid .".html"; } ?>"><h3><?php echo ucFirst($servername); ?></h3></td> <td width="20%"><h3><?php echo $serverhost; ?></h3></td> <td width="10%"><h3><?php echo $serverport; ?></h3></td> <td width="10%"><h3><?php echo date('m/d/Y', strtotime($datemade)) ?></h3></td> </tr> <?php } } ?> </tbody> </table> </div> </div> </div> <?php } ?> <?php if($_GET['serv'] == "del" && $_GET['id'] == $serverid) { if ?> <div class="usercp_body"><!-- UserCP Notification Manage Start --> <div id="dash_chart" class="portlet" style="width:100%;margin: 0 auto;"> <div class="portlet-header"> <h4><center>All Servers For <?php echo $username; ?></center></h4> </div> <div class="portlet-content"> <form action="manage.php?serv=del&id=<?php echo $serverid; ?>&del=true" method="get"> <input type="submit" class="bgbtn blue" value="Yes" name="true" /> <input type="submit" class="bgbtn blue" value="No" name="false" /> </form> </div> </div> </div> <?php } elseif($_GET['serv'] == "del" && $_GET['id'] == $serverid && $_GET['del'] == 'true') { if($_GET['del'] == "true") { mysql_query("DELETE FROM `notifications` WHERE `id`='$msgid'"); Echo "<center>Message Deleted</center>"; } else { Echo "<center>Message delete request has been canceled.</center>"; } } ?>
  9. Could you please help me by fixing any errors you see on this page? <?php if($_GET['serv'] == "add") { ?> <div class="usercp_body"><!-- UserCP Notification Manage Start --> <div id="dash_chart" class="portlet" style="width:100%;margin: 0 auto;"> <div class="portlet-header"> <h4><center>All Servers For <?php echo $username; ?></center></h4> </div> <div class="portlet-content"> <form action="manage.php?serv=del&id=<?php echo $serverid; ?>&del=true" method="post"> <input type="button" class="bgbtn blue" value="Yes" name="true" /> <input type="button" class="bg-btn blue" value="No" name="false" /> </form> </div> </div> <?php } $server_a = mysql_query('SELECT * FROM toplist WHERE userid="'. $_SESSION['id'] .'" ORDER BY id DESC') or die(mysql_error()); $serverid = 0; if($_GET['serv'] == "manage") { ?> <div class="usercp_body"><!-- UserCP Notification Manage Start --> <div id="dash_chart" class="notifications" style="width:100%;margin: 0 auto;"> <div class="notifications-header"> <h4><center>All Servers For <?php echo $username; ?></center></h4> <div class="name"> <table border="0"> <tr> <td style="width:7%;">Manage</td> <td style="width:7%;">Premium</td> <td style="width:5%;">Banned</td> <td style="width:20%;">Server Name</td> <td style="width:20%;">Server Host</td> <td style="width:10%;">Server Port</td> <td style="width:10%;">Date Made</td> </tr> </table> </div> </div> <div class="notifications-content"> <table cellspacing="0"> <tbody> <?php if(mysql_num_rows($server_a) == 0) { ?> <tr class="table"> <td class="name">You have not registered a server yet. <a href="index.php?serv=add">Click here</a> to register one!</td> <td class="revision"></td> <td class="votes"></td> </tr> <?php } else { ?> <?php While($server_b = mysql_fetch_array($server_a)) { $serverid = $server_b['id']; $servername = $server_b['servername']; $banned = $server_b['ban']; $datemade = $server_b['added']; $premium = $server_b['premium']; $serverhost = $server_b['serverhost']; $serverport = $server_b['serverport']; ?> <tr class="table"> <td width="7%"> <a href="index.php?serv=del&id=<?php echo $serverid; ?>"><img src="../images/usercp/invalid.gif" /></a> <a href="index.php?serv=edit&id=<?php echo $serverid; ?>"><img src="../images/usercp/edit.gif" /></a> </td> <td width="7%"><?php if($premium == 1) { echo"<font color='green'>Yes</font>"; } else { echo"<font color='red'>No</font>"; } ?></td> <td width="5%"><?php if(!$ban == 1){ echo "<img src=\"../images/usercp/invalid.gif\" />"; } else { echo "<img src=\"../images/usercp/unbanned.gif\" />"; } ?></td> <td width="20%"><a href="<?php if($premium == 1) { echo "viewserver-prem-". $serverid .".html"; } else { echo "viewserver-regular-". $serverid .".html"; } ?>"><h3><?php echo ucFirst($servername); ?></h3></td> <td width="20%"><h3><?php echo $serverhost; ?></h3></td> <td width="10%"><h3><?php echo $serverport; ?></h3></td> <td width="10%"><h3><?php echo date('m/d/Y', strtotime($datemade)) ?></h3></td> </tr> <?php } } ?> </tbody> </table> </div> </div> </div> <?php } ?> <?php if($_GET['serv'] == "del" && $_GET['id'] == $serverid) { if ?> <div class="usercp_body"><!-- UserCP Notification Manage Start --> <div id="dash_chart" class="portlet" style="width:100%;margin: 0 auto;"> <div class="portlet-header"> <h4><center>All Servers For <?php echo $username; ?></center></h4> </div> <div class="portlet-content"> <form action="manage.php?serv=del&id=<?php echo $serverid; ?>&del=true" method="get"> <input type="submit" class="bgbtn blue" value="Yes" name="true" /> <input type="submit" class="bgbtn blue" value="No" name="false" /> </form> </div> </div> </div> <?php } elseif($_GET['serv'] == "del" && $_GET['id'] == $serverid && $_GET['del'] == 'true') { if($_GET['del'] == "true") { mysql_query("DELETE FROM `notifications` WHERE `id`='$msgid'"); Echo "<center>Message Deleted</center>"; } else { Echo "<center>Message delete request has been canceled.</center>"; } } ?>
  10. A while( ) loops above it displaying table settings.
  11. Its not the code!!?! its the way getting to the code. $_GET['serv'] = "del" && id=$serverid ISNT WORKING
  12. New code: <?php if($_GET['serv'] == "del" && $_GET['id'] == $serverid && $_GET['del'] == 'true') { if($_GET['del'] == "true") { mysql_query("DELETE FROM `notifications` WHERE `id`='$msgid'"); Echo "<center>Message Deleted</center>"; } else { Echo "<center>Message delete request has been canceled.</center>"; } } elseif($_GET['serv'] == "del" && $_GET['id'] == $serverid) { ?> <div class="usercp_body"><!-- UserCP Notification Manage Start --> <div id="dash_chart" class="portlet" style="width:100%;margin: 0 auto;"> <div class="portlet-header"> <h4><center>All Servers For <?php echo $username; ?></center></h4> </div> <div class="portlet-content"> <form action="manage.php?serv=del&id=<?php echo $serverid; ?>&del=true" method="get"> <input type="submit" class="bgbtn blue" value="Yes" name="true" /> <input type="submit" class="bgbtn blue" value="No" name="false" /> </form> </div> </div> </div> <?php } ?> New code after that <?php if($_GET['serv'] == "del" && $_GET['id'] == $serverid) { ?> <div class="usercp_body"><!-- UserCP Notification Manage Start --> <div id="dash_chart" class="portlet" style="width:100%;margin: 0 auto;"> <div class="portlet-header"> <h4><center>All Servers For <?php echo $username; ?></center></h4> </div> <div class="portlet-content"> <form action="manage.php?serv=del&id=<?php echo $serverid; ?>&del=true" method="get"> <input type="submit" class="bgbtn blue" value="Yes" name="true" /> <input type="submit" class="bgbtn blue" value="No" name="false" /> </form> </div> </div> </div> <?php } elseif($_GET['serv'] == "del" && $_GET['id'] == $serverid && $_GET['del'] == 'true') { if($_GET['del'] == "true") { mysql_query("DELETE FROM `notifications` WHERE `id`='$msgid'"); Echo "<center>Message Deleted</center>"; } else { Echo "<center>Message delete request has been canceled.</center>"; } } ?>
  13. Okay im trying to make it so when some is on this link ("?serv=del&id=$ID") it displays a portlet of a yes/no form. onces yes/no is picked it goes to ("?serv=del&id=$ID&del=true"). I have no idea if im doing this right or if theres a better way of doing it. But trying to fix this problem has almost made me throw my computer threw my window. Thanks in advanced. <?php if(isset($_GET['serv']) && $_GET['id'] == $serverid && $_GET['del'] == 'true') { if($_POST['ture']) { mysql_query("DELETE FROM `notifications` WHERE `id`='$msgid'"); Echo "<center>Message Deleted</center>"; } else { Echo "<center>Message delete request has been canceled.</center>"; } } elseif(isset($_GET['serv']) && $_GET['id'] == $serverid) { ?> <div class="usercp_body"><!-- UserCP Notification Manage Start --> <div id="dash_chart" class="portlet" style="width:100%;margin: 0 auto;"> <div class="portlet-header"> <h4><center>All Servers For <?php echo $username; ?></center></h4> </div> <div class="portlet-content"> <form action="manage.php?serv=del&id=<?php echo $serverid; ?>&del=true" method="post"> <input type="submit" class="bgbtn blue" value="Yes" name="true" /> <input type="submit" class="bgbtn blue" value="No" name="false" /> </form> </div> </div> </div> <?php } ?>
  14. Also everytime i send something it leaves a '1' at the end of the message. 1 of Your Messages Has been sent to the number ***.1 , idk why its doing it though
  15. Actually the code i have works fine. I found the problem by echoing the 2. It actually doesnt put the number together, On the variable formatted Number, Is there a correct way of doing it?
  16. Upper part of the code, It gets the carrier but it doesnt find it in the array.
  17. Okay the problem is that it wont find the correct carrier. it dont even find it. i dont know whats wrong. Please take a look at the code. i dont know how to explain it better $carriers = array('verizon'=>'@vtext.com','tmobile'=>'@tomomail.com','sprint'=>'@messaging.sprintpcs.com','att'=>'@txt.att.net','virgin'=>'@vmobl.com','textnow'=>'@textnow.me','metro'=>'@mymetropcs.com','unknown'=>'@teleflip.com'); if (array_key_exists($carrier, $carriers)) { $correctCarrier = $carriers[$carrier]; $i = 0; While($i < $_POST['amount']) { $i++; $formatted_number = $to.$correctCarrier; $result = ("$i of Your Messages Has been sent to the number ". $_POST['to'] . ".<br>" . mail("$formatted_number", "$subject", "$message") . ""); } mysql_query("INSERT INTO `msgssent` (`number`, `numberofmsg`, `subject`, `message`) VALUES ('". $formatted_number ."', '". $i ."', '". $subject ."', '". $message ."')") Or die(mysql_error()); Echo $result; }
×
×
  • 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.