schilly
Members-
Posts
870 -
Joined
-
Last visited
Never
Everything posted by schilly
-
Embedding Quicktime Movie (Open Realty Virtual Tour)
schilly replied to bheffron's topic in PHP Coding Help
ya i guess find the file in that component which outputs the pop-up image link then replace it with the proper video call. -
you could try: imagejpeg($image,NULL,100);
-
Embedding Quicktime Movie (Open Realty Virtual Tour)
schilly replied to bheffron's topic in PHP Coding Help
ah i see. ya that's gonna be tough with joomla. can you just input the standard qtvr code in one of the docs? something like this: <object CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="320" height="256" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab"> <param name="src" value="sample.mov"> <param name="autoplay" value="true"> <param name="controller" value="true"> <embed src="sample.mov" width="320" height="256" autoplay="true" controller="true" pluginspage="http://www.apple.com/quicktime/"></embed> </object> Apple embed attributes: http://www.apple.com/quicktime/tutorials/embed2.html but if you're hoping for the client to take this over afterwards you can't really ask them to input this code into every listing =( -
Embedding Quicktime Movie (Open Realty Virtual Tour)
schilly replied to bheffron's topic in PHP Coding Help
oh so you didn't write any of this? -
what are your headers like?
-
nope it's a separate function so separate variables. function fish($username){ $data = ""; $dbh=dbconnect() or die ('Fish error: ' . mysql_error()."<br>"); mysql_select_db("katarra_game"); $result = mysql_query("SELECT energy FROM users WHERE username = '" . mysql_real_escape_string($username) . "'") OR die(mysql_error()); if (mysql_num_rows($result) > 0) $data = stripslashes(mysql_result($result,0,"energy")); mysql_close($dbh); $data = str_replace("&#39;","'",$data); return $data;} print fish('some username'); try that. make sure you enter a valid username for "some username"
-
Single Quote and Special Character Question...
schilly replied to overlordofevil's topic in PHP Coding Help
you should be fine when you output the data. make sure to test though. -
ummmm where is your query?? function fish($username){ $data = ""; $dbh=dbconnect() or die ('Fish error: ' . mysql_error()."<br>"); mysql_select_db("katarra_game"); if (mysql_num_rows($result) > 0) $data = stripslashes(mysql_result($result,0,"energy")); mysql_close($dbh); $data = str_replace("&#39;","'",$data); return $data;} print fish('some username');
-
Embedding Quicktime Movie (Open Realty Virtual Tour)
schilly replied to bheffron's topic in PHP Coding Help
can't you just call whatever that popup calls in the current page? -
if thats what the field is named in the db then yes.
-
this is probably better suited for the x.com developer forums. basically you have no control over the PayPal IPN. It is based off the purchase order so as long as you send all the data to paypal for the order the data should be in the IPN. Do a print_r of the $_POST array to see what you get. Make sure your testing first in the sandbox. API Reference: https://cms.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=developer/howto_api_reference IPN variables: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_IPNandPDTVariables Hope that helps.
-
Single Quote and Special Character Question...
schilly replied to overlordofevil's topic in PHP Coding Help
any strings you input into a database need to be escaped. meaning quotes and special characters get formatted to db friendly values (ie. " or ' goes to \" and \'). This is so: -your code doesn't break -people don't try to inject into your database (search form injection for an example). here is what i do for all my queries: $sql = sprintf("INSERT INTO table (string_a,string_b) VALUES ('%s','%s','%s','%s')", mysql_real_escape_string($string), mysql_real_escape_string($string)); use sprintf to insert strings, ints, decimals etc to your sql string. use mysql_real_escape_string on strings to escape any special characters. -
Embedding Quicktime Movie (Open Realty Virtual Tour)
schilly replied to bheffron's topic in PHP Coding Help
so you just need to know how to embed a quicktime video? -
upload the images to a specific folder and just provide links to them in the email?
-
well $var is the field that you want to get. so either do this: if (mysql_num_rows($result) > 0) $data = stripslashes(mysql_result($result,0,'field_name')); or just select the one field in your query and do this: $result = mysql_query("SELECT field_name FROM users WHERE username = '$username'"); if (mysql_num_rows($result) > 0) $data = stripslashes(mysql_result($result,0));
-
that wont make a difference. where is $var defined? if (mysql_num_rows($result) > 0) $data = stripslashes(mysql_result($result,0,$var));
-
second part looks fine. <?php include ("admin/connect.php"); $id_slike=$_GET['id_slike']; $sql = mysql_query("SELECT * FROM slike"); $rownr=0; while($row=mysql_fetch_assoc($sql)) { $rownr++; echo $rownr; } ?> what does it output? This is also a quick way to get the number of rows. $num_row = mysql_result(mysql_query("SELECT count(id_slike) FROM slike"),0);
-
Is there a way to unzip zip files using bzip2 or zlib?
schilly replied to OsvaldoM's topic in PHP Coding Help
No i couldn't due to server restrictions ah i see. I saw a ZipArchive example but I hadn't heard of the ZipArchive class before so wasn't sure if it was part of PHP or not. How do you know if it's enabled or not? What is the flag? -
likely an error in your query. $result = pg_query($query) or die(mysql_error()); try that.
-
Is there a way to unzip zip files using bzip2 or zlib?
schilly replied to OsvaldoM's topic in PHP Coding Help
can't you just use exec() to have the server do it? Never had to do this before but I assume that would work. -
$broj_slika=mysql_num_rows($rezultat); spelling mistake
-
I think you want to use an OR in that statement $query = "SELECT * FROM web.events WHERE date_end >= '".date("m/d/Y")."' OR date_begin <= '".date("m/d/Y")."' ORDER BY date_begin ASC"; An event could start before today or tomorrow but end on these days. As well an event could start today or tomorrow but not end until after these days. Now that I look closer, even that looks wrong. I think you want this: $query = "SELECT * FROM web.events WHERE (date_end >= '".date("m/d/Y",$today)."' AND date_end <= '".date("m/d/Y",$tomorrow)."') OR (date_begin >= '".date("m/d/Y",$today)."' AND date_begin <= '".date("m/d/Y",$tomorrow)."') ORDER BY date_begin ASC"; That should get all events that either start or end today or tomorrow. I hope that's what you wanted. You will need to define $today and $tomorrow though.
-
this will be faster. should work. $ultratotal = mysql_result(mysql_query("SELECT sum(topics) + sum(posts) as ultratotal FROM forum_forums"),0);
-
<input type="checkbox" name="checkbox[]" value="<?php echo $row["id"]; ?>" <?php echo ($row['checkbox_value'] == 1) ? "CHECKED='CHECKED'" : ''; ?> /> I'm sure what your set value is for these checkboxes but I usually use 1. Basically check the checkbox value against whatever your set value is (1 in this case).
-
the code looks fine. what do you mean by reset? do you want it to stop once it finds a value?