Jump to content

derrick1123

Members
  • Posts

    122
  • Joined

  • Last visited

    Never

Everything posted by derrick1123

  1. I'ts been bugging me for a few days, so I decided to try and get some help. function somestuff_ConfigOptions($params) { ini_set("soap.wsdl_cache_enabled", "0"); $rwsdl = "https://somesite"; $vwsdl = "https://somesite"; $rurl = "https://somesite"; $vurl = "https://somesite"; $rns = "somestuff"; $vns = "somestuff"; $apiuser=somestuff; $apikey=somestuff; $auth = array ( "username" => $apiuser, "apiKey" => $apikey ); $soapClient = new SoapClient($rwsdl, array("trace" => 1)); $oSoapVar= new SoapVar( $auth, SOAP_ENC_OBJECT); $oSoapHeader = new SoapHeader($rns, 'RequestCredentials', $oSoapVar); try { $info = $soapClient->__soapCall('locationList',array(), array(), $oSoapHeader); } catch (SoapFault $exception) { return $exception; } $locations=$info->{'locations'}; $lc = count($locations); $llist = ""; for($i=1;$i<$lc;$i++) { $llist .= $locations[$i]->{'locationId'}."|".str_replace(",",";",$locations[$i]->{'name'}).","; } $llist .= $locations[0]->{'locationId'}."|".str_replace(",",";",$locations[0]->{'name'}); $configarray = array( "Location" => array( "Type" => "dropdown", "Options" => $llist), ); return $configarray; } It works perfectly as a drop down, which allows me to choose the location I want in the back-end...but I want the users to be able to choose the location. I would need to be able to push it to Config Fields instead of Module Settings.
  2. THANK YOU! That key thing saved my life, after I changed it into a different word in every script...it seems to look a lot cleaner, and less room for mistakes.
  3. Page Error Output KEY: uuUIeA62GWIIwo SID: 4 TITLE: Vid DESCRIPTION: Test URL: mygood.avi You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key, url) VALUES ('4', 'Vid', 'Test', 'uuUIeA62GWIIwo', 'mygood.avi')' at line 1 To get the most accurate help, I will post everything on the page. <? function rand_chars($c, $l, $u) { if (!$u) for ($s = '', $i = 0, $z = strlen($c)-1; $i < $l; $x = rand(0,$z), $s .= $c{$x}, $i++); else for ($i = 0, $z = strlen($c)-1, $s = $c{rand(0,$z)}, $i = 1; $i != $l; $x = rand(0,$z), $s .= $c{$x}, $s = ($s{$i} == $s{$i-1} ? substr($s,0,-1) : $s), $i=strlen($s)); return $s; } $PAGE['title'] = "AddVideo"; include "../public_src/admin/header.php"; include "../include/constants.php"; $c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; $con = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error()); mysql_select_db(DB_NAME, $con) or die(mysql_error()); $result = mysql_query("SELECT * FROM vids ORDER BY sid ASC"); while($row = mysql_fetch_array($result)){ $Rsid = $row['sid']; } mysql_close($con); $key = (string)rand_chars($c, rand(5,15), FALSE); $sid = $Rsid+1; $con1 = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error()); mysql_select_db(DB_NAME, $con1) or die(mysql_error()); echo "KEY: ".$key; echo "<br>SID: ".$sid; echo "<br>TITLE: ".$_POST['title']; echo "<br>DESCRIPTION: ".$_POST['description']; echo "<br>URL: ".$_POST['url']; $sql = "INSERT INTO vids (sid, title, description, key, url) VALUES ('".$sid."', '".$_POST['title']."', '".$_POST['description']."', '".$key."', '".$_POST['url']."')"; mysql_query($sql) or die(mysql_error()); echo "<br><br>Video Added..."; echo "<meta http-equvi='refresh' content='5;url=admin.php'>"; mysql_close($con1); ?> What is being sent is on the page already...but I will re-show it. KEY: uuUIeA62GWIIwo SID: 4 TITLE: Vid DESCRIPTION: Test URL: mygood.avi Any help at all is already greatly appreciated!
  4. Navicat is just a way to access the database. So as long as you have MySQL started, you can just "add a server" to your navicat.
  5. Thanks for the heads up. ^.^ Oh, and my WoW site went down when I lost my HDD about 2years ago. >.<
  6. Well, problem is I don't have access to my php.ini file, but I can edit it remotely with php_value <bla> <bla>
  7. .htaccess php_value post_max_size 5125M php_value upload_max_filesize 5125M php_value max_execution_time 900 php_value max_input_time 900 Would this work? and the use the following in the header or .htaccess? ini_set("max_execution_time", "900");
  8. I am trying to use: set_time_limit(900); at the top of my script, but I don't know if that will work becuase I can't access my site from school. My problem was that the script would stop uploading to the website after a sertain amount of time, I just wanted to know if this little bit of code would help solve my problem.
  9. lol, for now I don't want search engines to find my site. Thanks for this information though, much appreciated.
  10. This is what I tried: Alpine's Ajaxrequest.js script. http://www.phpfreaks.com/forums/index.php/topic,115581.0.html index.php <script type="text/javascript" language="javascript" src="src/ajaxrequest.js"></script> <!--Yes, I know its in a folder called src--> <div id="player"> <? if($l=="1"){ ?> <div id="container"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div> <script type="text/javascript"> var s1 = new SWFObject("player.swf","ply","428","300","9","#000000"); s1.addParam("allowfullscreen","true"); s1.addParam("allowscriptaccess","always"); s1.addParam("flashvars","file=<? echo $type."/".$video; ?>&autostart=true"); s1.write("container"); </script> <? } if($embed_code==true){?> <? }?> </div> <? echo " <a href="javascript: MyAjaxRequest('player','index.php?l=1&type=".$type."&video=".$video."&autostart=true')">Play Video</a> "; ?>
  11. Sorry, I know I am necroposting, but I just realised this said "CLEAN" lol. This is like anti-clean way of using URLs.
  12. I was going to edit my other post... I just want to figure out how to send some variables and display the information, like whether or not to show the video player.
  13. Yes, that's exactly how I was thinking it would work. Ajax just blows my mind, so nothing to me seems logical. Most of Ajax seems like magic.
  14. I want the following to use ajax to load, but couldn't think of a good way to do it. I know my coding styles are not clean, sorry. <? echo " <a href='?l=1&type=videos&video=".$video."&autostart=true'>Videos List</a> | <a href='?l=1&type=movies&video=".$video."&autostart=true'>Movies List</a> | <a href='?l=1&type=uvideos&video=".$video."&autostart=true'>User Uploaded List</a> | <a href='?l=1&type=htf&video=".$video."&autostart=true'>Happy Tree Friends Videos</a><br> "; //// VIDEOS if($type=="videos"){ echo "<form method=get><select name=video>"; $dir = "videos/"; // Open a known directory, and proceed to read its contents if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($rfile = readdir($dh)) !== false) { if($rfile=="." || $rfile==".." || $rfile=="" || $rfile==" ") { } else { echo "<option value=\"".$rfile."\">".$rfile."</option>"; } } closedir($dh); } } echo "</select>"; echo "<input type=hidden name=l value=1><input type=hidden name=type value=videos>"; echo "<input type=submit value=load></form>"; } //...etc ?>
  15. The first one I used the code on, didn't work. So the second one was just showing what I thought would work. I don't mind using java, I just don't really understand it.
  16. I have a forum that needs to be submitted on click. <form method=get> <select name=listen> <option value=<? echo $one; ?>>Charr Radio</option> <option value=<? echo $two; ?>>Metal</option> <option value=<? echo $three; ?>>Classic Rock</option> <input type=submit value=Listen> </select> </form> Needs to be something like? <form method=get> <select name=listen> <option value=<? echo $one; ?> type=submit>Charr Radio</option> <option value=<? echo $two; ?> type=submit>Metal</option> <option value=<? echo $three; ?> type=submit>Classic Rock</option> </select> </form>
  17. I just used .htaccess because that is what I had going. I can't find a way to have: http://mysite.com/index.php?games=packman go to: http://mysite.com/games/packman Nor do I remember what this was called. ??? :-\ By the way, I didn't intend on using .htaccess. My friend suggest I look into it, so that is what I got from it. I rather use PHP.
  18. I want to go from: http://mysite.com/blog/122 To: http://mysite.com/?blog=122 VIA .htaccess _______________________ This is what I have so far (which doesn't exactly work the way I want it to): RewriteEngine on RewriteRule ^blog/([^/\.]+)/?$ index.php?blog=$1 [L]
  19. I would suggest XAMPP...but its more personal prefs...
  20. I have used a script made by my friend and he hasn't messed with code in over 6 months...so he can't believe he wrote it! -.- Meaning I need professional help... If anyone can help me and see my problem: http://coder.aflog.org/index.php/topic,29.0.html _________________________________________ This is the code I needed help with...if you need more pages...please ask. Pages: - MySQL Table (sql) - Login form (html) - login.html - Login script (php) - login.php - Registration form (html) - register.html - Registration script (php) - register.php - Authentication Script (php) - authen.php - Settings File (php) - settings.php _________________________________________ The login part and the part that shows the users name is showing, both parts are showing. +--> INDEX.php (The form part!) <?php include "member/authen.php"; if($logged_in == FALSE){ echo "<a href=\"" . $member['register'] . "\">Register Here </a> <br /> <img src=\"images/CZUser/li.gif\" align=\"absmiddle\"> <a href=\"mailto:" . $general['email'] . "\">Lost Password</a><br /><br />"; } ?> <table border="0"> <?php if($logged_in == FALSE){ echo "<form action=" . $member['folder'] . "/" . $member['login'] . " method=\"post\">"; echo "<tr><td><input type=\"text\" name=\"username\" size=\"15\" maxlength=\"25\" value=\"<username>\" onFocus=\"if(this.value=='<username>')this.value='';\"></td></tr>"; echo "<tr><td><input type=\"password\" name=\"password\" size=\"15\" maxlength=\"20\" value=\"<password>\" onFocus=\"if(this.value=='<password>')this.value='';\"></td></tr>"; echo " <input type=\"submit\" value=\"Login\"></form>"; } if($logged_in == TRUE) { echo "<tr><td>Welcome " . $username . "!</td></tr>"; } ?> +--> authen.php <?php // Authen.php // Connect to the database require("settings.php"); $logged_in = FALSE; // Get the cookie data (if there) if(isset($_COOKIE['_authen_m']) && isset($_COOKIE['_authen_k'])){ $m = $_COOKIE['_authen_m']; $k = $_COOKIE['_authen_k']; $r = mysql_query("SELECT * FROM " . $db['table'] . " WHERE id='$m' AND hash='$k'"); if(mysql_numrows($r)>0){ $logged_in = TRUE; } } // Use this to make sure people login /* if(!$logged_in){ echo " "; //Need to login??? } */ // Close MySQL Connection mysql_close(); ?> I don't mind the user's name not showing right now...but why does the login page still show?
  21. OK, well can you tell me what that host file's name is? I can search for it...
  22. Where is the Vhost located in apache ? My computer doesn't have system32 ???
  23. Windows VISTA I have been trying to get it to work with .htaccess... This is what I have so far: Options +FollowSymlinks RewriteEngine ON RewriteCond %{HTTP_HOST}!^sw337\.servegame\.com RewriteRule^(.*)$ http://sw337.servegame.com/en RewriteCond %{HTTP_HOST}!^sfuk\.servegame\.com RewriteRule^(.*)$ http://sfuk.servegame.com/sfuk
×
×
  • 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.