Jump to content

derrick1123

Members
  • Posts

    122
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://sw337.servegame.com

Profile Information

  • Gender
    Not Telling

derrick1123's Achievements

Member

Member (2/5)

0

Reputation

  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.
×
×
  • 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.