Jump to content

dargpat

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by dargpat

  1. This idea is not new. I remember about 10 years ago there was a site similar to what I have. I think it was called Crush 007. So I did my best to replicate it. Its a prank site that collects personal information and sends it to the person who created the link. Try it out and give me some feedback: ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- http://krush007.dargpat.com
  2. Thanks for the advice ... didn't know it was called obfuscation. So using obfuscation what is the best route to go, so that its also compatiable with all servers ... paid service and free service if possible!
  3. Here's what I have: index.php footer.pgp function.php OK ... so I have a function called get_branding() located in the function.php file. The index.php file will include the footer.php file via include() The footer.php file will call the function get_branding(); Thus displaying in the footer a copyright notice! I know I will encode the function.php file later, but how do I write a code where if someone removes get_branding() or removes the footer completely to deactivate the site or produce an overlay stating they weren't auth to remove branding. (without using zend, ioncube .. etc) Thanks
  4. Thanks DJ! Actually both of your methods are working! I've come to find out its a bug in a script called uploadify. If you've seen or heard about this bug, please help .. thanks! And thanks again for everyone's help! I've done some research now and I'm not the only one trying to use this script and change the upload directory via dropdown boxes
  5. I'm figuring the VALUE to the first selection is set in stone when the page loads. So is there an OnChange script I could use to change the value to the SELECT element when I select a new one?
  6. When I use that DJ it always returned undefined. What I've come to notice using the other method is it always return the first selection value. So its working, its just not returning what I select. Again This works... var upl = document.getElementById('folder').selectedIndex; var dir = document.getElementById('folder').options[upl].value; But it always return the first option value it sees in the dropdown list.. lil more help please...
  7. ahhh .. now I understand ... it works ...well sorta! This is what I have! <script type="text/javascript"> $(document).ready(function() { var upl = document.getElementById('folder').selectedIndex; var dir = document.getElementById('folder').options[upl].value; $('#file_upload').uploadify({ 'uploader' : '/uploadify/uploadify.swf', 'script' : '/uploadify/uploadify.php', 'cancelImg' : '/uploadify/cancel.png', 'fileExt' : '*.jpg', 'folder' : dir, 'multi' : true, 'queueSizeLimit' : 10, 'removeCompleted' : true, 'auto' : true }); }); </script> If I use this HTML code where SELECTED is used in OPTIONS list, it returns correct selection: <select id="folder"> <option value="">Choose One</option> <option value="/PATH/TO/DIR" SELECTED>Path 2</option> </select> But if I use this method where SELECTED is not used then it returns nothing as if the function didn't fire! (and it uploads to root folder .. yes its an uploaded if you haven't figured it out) <select id="folder"> <option value="">Choose One</option> <option value="/PATH/TO/DIR">PATH 2</option> </select> In other words its not working when manually selecting an option? what am I doing wrong?
  8. I'm not too keen on java but I tried that also and its not working
  9. newb here ..... I hope I am in the right forum... What am I doing wrong... <script type="text/javascript"> $(document).ready(function() { var upl = document.getElementById('folder').value; <!--- I NEED THIS VARIABLE TO GO BELOW $('#file_upload').uploadify({ 'uploader' : '/uploadify/uploadify.swf', 'script' : '/uploadify/uploadify.php', 'cancelImg' : '/uploadify/cancel.png', 'fileExt' : '*.jpg', 'folder' : '+upl+', <!--- BUT ITS NOT WORKING! .. 'multi' : true, 'queueSizeLimit' : 10, 'removeCompleted' : true, 'auto' : true }); }); </script> <select id="folder"> <option value="/PATH/TO/SELECTED/CAT" SELECTED>Category</option> </select> The element ID folder should return a path I need. I just need to know how do I call it correctly so that it returns correct path and not empty. I hope someone understands this...
  10. I know very little about VB but I know a whole lot about PHP. So figuring out coding comes easily .. sorta ...but I need someone to help me out. My job has a warehouse full of bins .. over 14 thousand that need to be deleted in the system. Of course the only way they are showing me to delete it is one by one. I rather not.... Since I know a little about computers, I see that the program I am using has macros. So I created a macro to help out a little with deletion, which looks like this: [PCOMM SCRIPT HEADER] LANGUAGE=VBSCRIPT DESCRIPTION= [PCOMM SCRIPT SOURCE] OPTION EXPLICIT autECLSession.SetConnectionByName(ThisSessionName) REM This line calls the macro subroutine subSub1_ sub subSub1_() autECLSession.autECLOIA.WaitForAppAvailable autECLSession.autECLOIA.WaitForInputReady autECLSession.autECLPS.SendKeys "1ul02" end sub That only writes part of the bin to be deleted. I would type the rest which would look like this in full: 1ul02012 The question is: Can someone help me write a script where it automatically hits enter and adds +1 to the last digit (but only reoccurs 6 times) For instance... I would like to be able to enter this bin into my system: 1UL0212 and I start the macro... The macro then... "Hits enter" calculates 1UL0212 + 1 and inputs 1UL0213 then hits enter calculates 1UL0213 + 1 and inputs 1UL0214 then hits enter calculates 1UL0214 + 1 and inputs 1UL0215 then hits enter calculates 1UL0215 + 1 and inputs 1UL0216 then hits enter .... so on until it reaches 1UL0218 and hits enter then stop Then I would move to next set of bins where I type 1UL0312 and I start macro The macro then... "Hits enter" calculates 1UL0312 + 1 and inputs 1UL0313 then hits enter calculates 1UL0313 + 1 and inputs 1UL0314 then hits enter calculates 1UL0314 + 1 and inputs 1UL0315 then hits enter calculates 1UL0315 + 1 and inputs 1UL0316 then hits enter .... so on until it reaches 1UL0318 and hits enter then stop ---------------- I don't know a better way to explain this? Sorry for long post ... any help would suffice Thanks Darrel
  11. Sometimes you have to figure things out yourself... But after hours or trial and error I found an answer to the php.ini (saw there were possibly more but this one works fine)
  12. I found out the problem... I took my php.ini file and placed it in the admin directory now everything is working 100% I thought by having php.ini in the root folder it would affect all sub-folders .... Can someone explain to me why php.ini in root is not affecting the sub-folders and what do I need to do, to accomplish that! Thanks
  13. returns: Array ( ) I also did it on members.php in root and it returned: Array ( [myusername] => admin [myuser_id] => 1 [admin] => admin1 ) and if I click link in members.php and goes to admin/index.php I get nothing in the array!
  14. I'm creating a script and having problems with the log in portion using sessions. Everything works fine when I set the sessions for the log in which is in the root directory. The problem arises when I try to create an admin area and cross from the user side to the admin side which is in a different directory of its own. I do an echo to check for the sessions in admin area and all are lost. /root <--sessions work 100% Click link to go to /root/admin <--- sessions are lost and yes all pages have session_start() Any advice would gladly be appreciated! Thanks Here is login code: <?php session_start(); include("admin/db/db_connect.php"); $myusername=$_POST['myusername']; $mypassword=$_POST['mypassword']; $myusername = stripslashes($myusername); $mypassword = stripslashes($mypassword); $myusername = mysql_real_escape_string($myusername); $mypassword = mysql_real_escape_string($mypassword); $sql="SELECT * FROM members WHERE user_name='$myusername' and user_pass='$mypassword'"; $result=mysql_query($sql); $rows=mysql_fetch_array($result); $status = $rows['status']; $user_id = $rows['user_id']; if(($status!="") && ($status==0)){ $m="Your Account has not been activated or is suspended!"; $m = base64_encode($m); header("location:login.php?m=$m"); exit(); } $count=mysql_num_rows($result); if($count==1){ $_SESSION['myusername'] = $myusername; $_SESSION['myuser_id'] = $user_id; if($user_id == "1"){ $_SESSION['admin'] = $myusername . $user_id; } //echo $user_id . $myusername."<p></p>"; //echo $_SESSION['myusername'] . $_SESSION['myuser_id'] . $_SESSION['admin']; //exit(); $m="Login Successful!"; $m = base64_encode($m); header("location:members.php?m=$m"); } else { $m="Login Failed, Please Try Again!"; $m = base64_encode($m); header("location:login.php?m=$m"); } ?> That works fine for members area and other files in root: <?php session_start(); include("inc/vars.php"); include("admin/db/db_connect.php"); include("inc/page_header.php"); if(!isset($_SESSION['myusername'])){ header("location:login.php"); } ?> <?php $m = $_GET['m']; $m = base64_decode($m); ?> <?php include("inc/page_footer.php");?> But it doesn't for this script in admin: <?php session_start(); $log = $_SESSION['myusername']; $in = $_SESSION['myuser_id']; $key = $log . $in; echo "<p>-->". $log . $in ."<--</p>"; echo $key."<-- Key"; exit(); //testing if($_SESSION['admin'] !== $key){ header("location:/login.php"); } $ImageDirx = "../sopImages/"; $func = $_GET["func"]; $picid = $_GET["picid"]; $dothis = $_GET["dothis"]; if($func != "" && $picid != "" && $dothis != ""){ function DoDelete($picid,$dothis) { include ("../inc/vars.php"); include ("db/db_connect.php"); include ("admin_header.php"); $query ="SELECT * FROM listings WHERE picid='$picid'"; $result = mysql_query($query); $row = mysql_fetch_array($result); $delete = $row["imagefile"]; // Delete image from server & DATABASE //echo $ImagePth . $delete;exit(); $sql = "DELETE FROM listings WHERE picid='$picid'"; $result = mysql_query($sql); @unlink($ImagePth . $delete); } function DoStatusC($func,$picid,$dothis) { include ("../inc/vars.php"); include ("db/db_connect.php"); include ("admin_header.php"); if($func == hold){ $Nactive = "n"; } else{ $Nactive = "y";} $query ="SELECT * FROM listings WHERE picid='$picid'"; $result = mysql_query($query); $myrow = mysql_fetch_array($result); $picid = $myrow["picid"]; $active = $myrow["active"]; $sql ="UPDATE listings SET active='$Nactive' WHERE picid='$picid'"; $result = mysql_query($sql); } if($func == "delete"){ DoDelete($picid,$dothis); } else { DoStatusC($func,$picid,$dothis); } } if (empty($_GET["dothis"])) { shownew(); Die(); } else {$dothis = $_GET["dothis"];} if($dothis == "echonew"){shownew(); die();} elseif($dothis == "echoactive"){showactive(); die();} elseif($dothis == "echoall"){showall(); die();} elseif($dothis == "resetDB"){DoresetDB(); die();} // Retrieve all images from the db function showall() { include("../inc/vars.php"); include ("db/db_connect.php"); include ("admin_header.php"); $query = "SELECT * FROM listings ORDER BY id DESC"; $result = mysql_query($query); $num = mysql_num_rows($result); if ($num == "0") {print("No Results");include("admin_footer.php"); die();} if ($num < "20") {$Xwarning = "WARNING: There are not enough images for this script to work correctly.<br>";} print("<font color='red'>$Xwarning</font>"); print("<font color='blue'>$num</font> Image(s)<br>"); if($num > 0){ $i=0; echo ""; while($i < $num){ $id = mysql_result($result, $i, "id"); $owner_id = mysql_result($result, $i, "owner_id"); $picid = mysql_result($result, $i, "picid"); $imagename = mysql_result($result, $i, "imagename"); $imagefile = mysql_result($result, $i, "imagefile"); $active = mysql_result($result, $i, "active"); $query2 ="SELECT * FROM members WHERE user_id='$owner_id'"; $result2 = mysql_query($query2); $myrow2 = mysql_fetch_array($result2); $name = $myrow2["user_name"]; if ($active == "n") {$status = "Hold";} else {$status = "Active";} if ($active == "n") {$statusL = "<a href=\"inedx.php?func=allow&picid=$picid&dothis=echoall\">Click to Allow</a>";} else {$statusL = "<a href=\"index.php?func=hold&picid=$picid&dothis=echoall\">Click to Hold</a>";} echo "<table border=\"0\" cellspacing=\"1\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width= \"585\"> <tr><td width=\"237\"><img src='../i.php?src=/".$ImageDir."".$imagefile."&h=&w=150&zc=0'></td> <td width=\"341\" valign=\"top\"><b>Submitted By:</b> <a href=\"member.php?user_id=".$owner_id."\">". $name."</a><br><b>Website:</b> ".$website."<br><b>Image Name:</b> ".$imagename."<br><b>Status:</b> ".$status."<br><br><a href=\"index.php?func=delete&picid=$picid&dothis=echoall\">Delete</a> | ".$statusL."</td> </tr>\n</table><hr color=\"#0000FF\" align=\"left\" width=\"570\" size=\"1\">"; $i++; } echo ""; } include("admin_footer.php"); } function shownew() { // Retrieve all new images from the db include("../inc/vars.php"); include ("db/db_connect.php"); include ("admin_header.php"); $query = "SELECT * FROM listings WHERE active='n' ORDER BY id DESC"; $result = mysql_query($query); $num = mysql_num_rows($result); if ($num == "0") {print("No Results"); include("admin_footer.php"); die();} print("<font color='blue'>$num</font> Image(s)<br>"); if($num > 0){ $i=0; echo ""; while($i < $num){ $id = mysql_result($result, $i, "id"); $owner_id = mysql_result($result, $i, "owner_id"); $picid = mysql_result($result, $i, "picid"); $imagename = mysql_result($result, $i, "imagename"); $imagefile = mysql_result($result, $i, "imagefile"); $active = mysql_result($result, $i, "active"); $query2 ="SELECT * FROM members WHERE user_id='$owner_id'"; $result2 = mysql_query($query2); $myrow2 = mysql_fetch_array($result2); $name = $myrow2["user_name"]; if ($active == "n") {$status = "Hold";} else {$status = "Active";} if ($active == "n") {$statusL = "<a href=\"index.php?func=allow&picid=$picid&dothis=echonew\">Click to Allow</a>";} else {$statusL = "<a href=\"index.php?func=hold&picid=$picid&dothis=echonew\">Click to Hold</a>";} echo "<table border=\"0\" cellspacing=\"1\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width= \"585\"> <tr><td width=\"237\"><img src='../i.php?src=/".$ImageDir."".$imagefile."&h=&w=150&zc=0'></td> <td width=\"341\" valign=\"top\"><b>Submitted By:</b> <a href=\"member.php?user_id=".$owner_id."\">". $name."</a><br><b>Website:</b> ".$website."<br><b>Image Name:</b> ".$imagename."<br><b>Status:</b> ".$status."<br><br><a href=\"index.php?func=delete&picid=$picid&dothis=echonew\">Delete</a> | ".$statusL."</td> </tr>\n</table><hr color=\"#0000FF\" align=\"left\" width=\"570\" size=\"1\">"; $i++; } echo ""; } include("admin_footer.php"); } function showactive(){ // Retrieve all Active images from the db include("../inc/vars.php"); include ("db/db_connect.php"); include ("admin_header.php"); $query = "SELECT * FROM listings WHERE active='y' ORDER BY id DESC"; $result = mysql_query($query); $num = mysql_num_rows($result); if ($num == "0") {print("No Results");include("admin_footer.php"); die();} if ($num < "20") {$Xwarning = "WARNING: There are not enough images for this script to work correctly.<br>";} print("<font color='red'>$Xwarning</font>"); print("<font color='blue'>$num</font> Image(s)<br>"); if($num > 0){ $i=0; echo ""; while($i < $num){ $id = mysql_result($result, $i, "id"); $owner_id = mysql_result($result, $i, "owner_id"); $picid = mysql_result($result, $i, "picid"); $imagename = mysql_result($result, $i, "imagename"); $imagefile = mysql_result($result, $i, "imagefile"); $active = mysql_result($result, $i, "active"); $query2 ="SELECT * FROM members WHERE user_id='$owner_id'"; $result2 = mysql_query($query2); $myrow2 = mysql_fetch_array($result2); $name = $myrow2["user_name"]; if ($active == "n") {$status = "Hold";} else {$status = "Active";} if ($active == "n") {$statusL = "<a href=\"index.php?func=allow&picid=$picid&dothis=echoactive\">Click to Allow</a>";} else {$statusL = "<a href=\"index.php?func=hold&picid=$picid&dothis=echoactive\">Click to Hold</a>";} echo "<table border=\"0\" cellspacing=\"1\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width= \"585\"> <tr><td width=\"237\"><img src='../i.php?src=/".$ImageDir."".$imagefile."&h=&w=150&zc=0'></td> <td width=\"341\" valign=\"top\"><b>Submitted By:</b> <a href=\"member.php?user_id=".$owner_id."\">". $name."</a><br><b>Website:</b> ".$website."<br><b>Image Name:</b> ".$imagename."<br><b>Status:</b> ".$status."<br><br><a href=\"index.php?func=delete&picid=$picid&dothis=echoactive\">Delete</a> | ".$statusL."</td> </tr>\n</table><hr color=\"#0000FF\" align=\"left\" width=\"570\" size=\"1\">"; $i++; } echo "$warning"; } include("admin_footer.php"); } ?>
  15. ahhh! .. Believe it or not I actually tried that and I couldn't get it to work. But now after your mentioning of playing with the css, It works! I couldn't figure out why I was only seeing the second image ...lol! Thanks a Million!! :D
  16. Thanks!! .. I love it .. it works like a charm!! ....but I have one more problem. As I'm not that familiar with java or jquery as I am with php .. I tried the last 3 hours to re-write this code with no success, to display two buttons. I know its something simple but I can not figure it out. Please help once more .. Thanks thorpe!!
  17. I'm making a script similar to Hot or Not. But I want the Hot or Not button to be unique. Lets say when an image has loaded for you to vote on. I would like for the vote buttons to not be visible until the user mouse over the image. Is it possible to have the voting buttons(which are images) fade in over the image to be voted and possible to make the buttons click-able?? If so, how can I do this and can someone help me make the script. I included an attachment of what I'm looking for! Thanks [attachment deleted by admin]
  18. Yeah that was just a demo code I know would work but like I said it's not. I just needed second opinion before I accuse godaddy of a faulty installation Thanks
  19. I have a script I sell which includes a few cron jobs to be ran. Every customer I have that I sold the script to, the cron jobs run fine except for this one cust on godaddy.com server. Here is the command I'm using on the godaddy server per their support: ( Link ) time is set via drop down boxes /web/cgi-bin/php5 -q "$HOME/html/tools/cron_1hour.php" After setting the cron job up, I keep getting input from the cron job about the script when it runs: I know "/web/cgi-bin/php5" is the path to php executable but what does the error mean. Does this have something to do with godaddy.com PHP installation build or is there something in my php script causing the error: here is one of the scripts below. <?php ini_set('include_path','.'); require(dirname(__FILE__)."/../includes/vars.inc.php"); require(dirname(__FILE__)."/../includes/functions.inc.php"); require(dirname(__FILE__)."/../includes/templates.inc.php"); require(dirname(__FILE__)."/../includes/apt_functions.inc.php"); db_connect(); $query="DELETE FROM online_status WHERE last_activity<=now()-INTERVAL "._EXPIRE_." MINUTE"; mysql_query($query); $session_path=session_save_path(); ?> Thanks
×
×
  • 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.