Jump to content

Mancent

Members
  • Posts

    147
  • Joined

  • Last visited

Everything posted by Mancent

  1. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> <?php if(isset($_GET['mVar'])){ session_start(); $_SESSION['views']=1; // Declaring a session to track the visits } else { session_start(); $_SESSION['views']=0; } if(!$_SESSION['views'] == 1){ // Checking the session and doing the redirection if ($_SERVER["QUERY_STRING"] == null){ echo " <script type=\"text/javascript\"> if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { window.location.replace('http://m.guntmarwolff.com');} </script> "; } } ?> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.js"></script> <!-- Add fancyBox main JS and CSS files --> <script type="text/javascript" src="http://www.guntmarwolff.com/fancyapps-fancyBox-v2.1.5-0-ge2248f4/source/jquery.fancybox.js"></script> <link rel="stylesheet" type="text/css" href="http://www.guntmarwolff.com/fancyapps-fancyBox-v2.1.5-0-ge2248f4/source/jquery.fancybox.css" media="screen" /> <script > jQuery(document).ready(function () { jQuery.fancybox({ 'width': '75%', //Use percentage to maintain responsiveness 'height': '75%', 'autoScale': true, 'transitionIn': 'fade', 'transitionOut': 'fade', 'type': 'iframe', 'href': 'popupbox.htm' }); }); </script>
  2. <?PHP require_once "core/connect.php"; $root_path = '../protected/accounts/'; if(isset($_GET["uid"])) { if(empty($_GET["uid"])) { //RETURN TO HEADER return; } else { //DO A SELECT MYSQL TO CHECK IF USER ID IS REAL $uid = $_GET["uid"]; } } else { //RETURN TO HEADER return; } if(isset($_GET["mid"])) { if(empty($_GET["mid"])) { //RETURN TO HEADER return; } else { //DO A SELECT MYSQL TO CHECK IF USER ID IS REAL $mid = $_GET["mid"]; //DO A CHECK TO MAKE SURE MID IS WHAT THE SESSION ID === ELSE RETURN TO HEADER if($mid == $_SESSION[mid]) { } else { //RETURN TO HEADER } } } else { //RETURN TO HEADER return; } if(isset($_GET["at"])) { if(empty($_GET["at"])) { //RETURN TO HEADER return; } else { //DO A SELECT MYSQL TO CHECK IF USER ACCESS_TOKEN IS REAL FOR MID $at = $_GET["at"]; } } else { //RETURN TO HEADER return; } if(isset($_GET["security"])) { if(empty($_GET["security"])) { //RETURN TO HEADER return; } else { //DO A SELECT MYSQL TO CHECK IF USER SECURITY IS SET TO PUBLIC FOR UID $security = $_GET["security"]; } } else { //RETURN TO HEADER return; } if(isset($_GET["f_stat"])) { if(empty($_GET["f_stat"])) { //RETURN TO HEADER return; } else { //DO A SELECT MYSQL TO CHECK IF USER UID IS FRIENDS WITH MID $f_stat = $_GET["f_stat"]; } } else { //RETURN TO HEADER return; } if(isset($_GET["path"])) { if(empty($_GET["path"])) { //RETURN TO HEADER return; } else { //DO A SELECT MYSQL TO CHECK PATH FOR USER ID $path = $_GET["path"]; } } else { //RETURN TO HEADER return; } if(isset($_GET["getfile"])) { if(empty($_GET["getfile"])) { //RETURN TO HEADER return; } else { //DO A SELECT MYSQL TO CHECK FILENAME FOR USER ID $getfile = $_GET["getfile"]; } } else { //RETURN TO HEADER return; } if(isset($_GET["thumb"])) { if(empty($_GET["thumb"])) { //RETURN TO HEADER return; } else { $thumb = $_GET["thumb"]; $mypath = $root_path.'/'.$uid.'/'.$path.'/'.$thumb.'/'.$getfile.''; if (file_exists($mypath)) { readfile($mypath); } else { //RETURN TO HEADER } } } else { $mypath = $root_path.'/'.$uid.'/'.$path.'/'.$getfile.''; if (file_exists($mypath)) { readfile($mypath); } else { //RETURN TO HEADER } } ?>
  3. ya that's good.. so this is working well the readfile was what I was missing. this is good so you can use, external drives to store files off site then just code it to connect. that is good. and this is working nicely http://somedomain.com/getfile.php?uid=1&path=images&getfile=nameoffile.jpg&private=false&accesstoken=dsjfbhsdfonebibds8ds89fy9dasfgnsd987fgn9y8ds9
  4. if(preg_match("/chrome/",strtolower($_SERVER['HTTP_USER_AGENT']))) { //use a different css maybe } elseif(preg_match("/msie/",strtolower($_SERVER['HTTP_USER_AGENT']))) { //use a different css maybe } elseif(preg_match("/opera/",strtolower($_SERVER['HTTP_USER_AGENT']))) { //use a different css maybe } elseif(preg_match("/firefox/",strtolower($_SERVER['HTTP_USER_AGENT']))) { //use a different css maybe } elseif(preg_match("/safari/",strtolower($_SERVER['HTTP_USER_AGENT']))) { //use a different css maybe } then add some if statements
  5. could do something like this echo $_SERVER['HTTP_USER_AGEENT'];
  6. <?PHP if(isset($_GET["uid"])) { $uid = $_GET["uid"]; } else { return; } if(isset($_GET["path"])) { $path = $_GET["path"]; } else { return; } if(isset($_GET["getfile"])) { $getfile = $_GET["getfile"]; } else { return; } if(isset($_GET["thumb"])) { $thumb = $_GET["thumb"]; $mypath = '../../protected/accounts/'.$uid.'/'.$path.'/'.$thumb.'/'.$getfile.''; } else { $mypath = '../../protected/accounts/'.$uid.'/'.$path.'/'.$getfile.''; } $line = '<img src="../../protected/accounts/'.$uid.'/'.$path.'/'.$getfile.'"/>'; echo $line; ?> So I was thinking about if I could do this also. I started to write the getfile.php and my thinking was to put the folder behind the web root. so say I have my web root here www/index.php and you can read and view all the files in the www root, but you can not view the folder behind it like dir listing www/ protected/ I wanted to put the files in the back so they are not access able using http://localhost/protected but I wanted the getfile.php to read the protected folder where they files are on the server, but not have a link using URL but that's not working yet. any ideas? how I can read files that are not in the web root directory
  7. I am not even sure if this can be done or not, nor do I know If I am asking in the right place. but here it goes. and to get in this folder account/1/ I want to add a file called getfile.php With some conditions to meet before it gets the file. for a example if I have a file called picture.jpg I do not want to be able to go to the web address and get the file directly. In this case it would be What I am wanting to do is to lock the folders and only be able to get the files if they go to a url like this get file will call for the folder of the account in this case 1 or path can be large in this case and also I will add other conditions that will be requested like access token so you just can not get into any one folders with out having the correct access. so when it is all said and done it would be something like this. and if all is well the file displays, but if not then nothing error message. but also even though the file is located at they can not go directly to that link to get the file with out going through the getfile.php so the getfile.php would send maybe some type of $_POST method that would unlock the folder maybe using .htaccss any one have any ideas how I can lock a folder, and then use php to access it.
  8. Never mind.. Inside Javascript you have to use <?php ?> if can not just be <? ?>
  9. OK This makes no sence to me.. My user ID is set I have tryied it this way. <?php global $UserId; $UserId=100001957015772; ?> And this way; <?php global $UserId; $UserId='100001957015772'; ?> Now in side the javascript i have it echoed. but it will not work. like this. xhr.open( 'POST', 'upload.php?UserId=<? echo $UserId ?>' ); But if i set it like this. xhr.open( 'POST', 'upload.php?UserId=100001957015772' ); it works just fine, whats wrong with it? INDEX.php <?php global $UserId; $UserId=100001957015772; ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="style/default.css" media="screen" /> <title>FileAPI nad XHR 2 ajax uploading</title> </head> <body> <div id="wrap"> <h1>Choose (multiple) files or drag them onto drop zone below</h1> <form action="" method="post" enctype="multipart/form-data"> <input type="file" id="fileField" name="fileField" multiple /> </form> <div id="fileDrop"> <p>Drop files here</p> </div> <div id="files"> <h2>File list</h2> <a id="reset" href="#" title="Remove all files from list">Clear list</a> <ul id="fileList"></ul> <a id="upload" href="#" title="Upload all files in list">Upload files</a> </div> </div> <script type="text/javascript"> function FileAPI (t, d, f) { var fileList = t, fileField = f, dropZone = d, fileQueue = new Array() preview = null; this.init = function () { fileField.onchange = this.addFiles; dropZone.addEventListener("dragenter", this.stopProp, false); dropZone.addEventListener("dragleave", this.dragExit, false); dropZone.addEventListener("dragover", this.dragOver, false); dropZone.addEventListener("drop", this.showDroppedFiles, false); } this.addFiles = function () { addFileListItems(this.files); } this.showDroppedFiles = function (ev) { ev.stopPropagation(); ev.preventDefault(); var files = ev.dataTransfer.files; addFileListItems(files); } this.clearList = function (ev) { ev.preventDefault(); while (fileList.childNodes.length > 0) { fileList.removeChild( fileList.childNodes[fileList.childNodes.length - 1] ); } } this.dragOver = function (ev) { ev.stopPropagation(); ev.preventDefault(); this.style["backgroundColor"] = "#F0FCF0"; this.style["borderColor"] = "#3DD13F"; this.style["color"] = "#3DD13F" } this.dragExit = function (ev) { ev.stopPropagation(); ev.preventDefault(); dropZone.style["backgroundColor"] = "#FEFEFE"; dropZone.style["borderColor"] = "#CCC"; dropZone.style["color"] = "#CCC" } this.stopProp = function (ev) { ev.stopPropagation(); ev.preventDefault(); } this.uploadQueue = function (ev) { ev.preventDefault(); while (fileQueue.length > 0) { var item = fileQueue.pop(); var p = document.createElement("p"); p.className = "loader"; var pText = document.createTextNode("Uploading..."); p.appendChild(pText); item.li.appendChild(p); if (item.file.size < 1048576) { uploadFile(item.file, item.li); } else { p.textContent = "File to large"; p.style["color"] = "red"; } } } var addFileListItems = function (files) { for (var i = 0; i < files.length; i++) { var fr = new FileReader(); fr.file = files[i]; fr.onloadend = showFileInList; fr.readAsDataURL(files[i]); } } var showFileInList = function (ev) { var file = ev.target.file; if (file) { var li = document.createElement("li"); if (file.type.search(/image\/.*/) != -1) { var thumb = new Image(); thumb.src = ev.target.result; thumb.addEventListener("mouseover", showImagePreview, false); thumb.addEventListener("mouseout", removePreview, false); li.appendChild(thumb); } var h3 = document.createElement("h3"); var h3Text = document.createTextNode(file.name); h3.appendChild(h3Text); li.appendChild(h3) var p = document.createElement("p"); var pText = document.createTextNode( "File type: (" + file.type + ") - " + Math.round(file.size / 1024) + "KB" ); p.appendChild(pText); li.appendChild(p); var divLoader = document.createElement("div"); divLoader.className = "loadingIndicator"; li.appendChild(divLoader); fileList.appendChild(li); fileQueue.push({ file : file, li : li }); } } var showImagePreview = function (ev) { var div = document.createElement("div"); div.style["top"] = (ev.pageY + 10) + "px"; div.style["left"] = (ev.pageX + 10) + "px"; div.style["opacity"] = 0; div.className = "imagePreview"; var img = new Image(); img.src = ev.target.src; div.appendChild(img); document.body.appendChild(div); document.body.addEventListener("mousemove", movePreview, false); preview = div; fadePreviewIn(); } var movePreview = function (ev) { if (preview) { preview.style["top"] = (ev.pageY + 10) + "px"; preview.style["left"] = (ev.pageX + 10) + "px"; } } var removePreview = function (ev) { document.body.removeEventListener("mousemove", movePreview, false); document.body.removeChild(preview); } var fadePreviewIn = function () { if (preview) { var opacity = preview.style["opacity"]; for (var i = 10; i < 250; i = i+10) { (function () { var level = i; setTimeout(function () { preview.style["opacity"] = opacity + level / 250; }, level); })(); } } } var uploadFile = function (file, li) { if (li && file) { var xhr = new XMLHttpRequest(), upload = xhr.upload; upload.addEventListener("progress", function (ev) { if (ev.lengthComputable) { var loader = li.getElementsByTagName("div")[0]; loader.style["width"] = (ev.loaded / ev.total) * 100 + "%"; } }, false); upload.addEventListener("load", function (ev) { var ps = li.getElementsByTagName("p"); var div = li.getElementsByTagName("div")[0]; div.style["width"] = "100%"; div.style["backgroundColor"] = "#0f0"; for (var i = 0; i < ps.length; i++) { if (ps[i].className == "loader") { ps[i].textContent = "Upload complete"; ps[i].style["color"] = "#3DD13F"; break; } } }, false); upload.addEventListener("error", function (ev) {console.log(ev);}, false); xhr.open( 'POST', 'upload.php?UserId=<? echo $UserId ?>' <--------------------------------------------------------------------------------------------------------------------DOWN HERE PROBLEM ); xhr.setRequestHeader("Cache-Control", "no-cache"); xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); xhr.setRequestHeader("X-File-Name", file.name); xhr.send(file); xhr.send(file); } } } UPLOAD.php <?php include "connect.php"; //$UserId='100001957015772'; $UserId = ($_GET['UserId']); if(empty($UserId)) {//1 //echo "Error!"; return true; }// else {//2 $query = "SELECT * FROM Access_Profile WHERE UserId = '$UserId'"; $results = mysql_query($query) or die("Data not found."); //Get the number of results from the query. $rows = mysql_num_rows($results); //echo "CHECKING!"; if($rows == 1) { echo $UserId; $root ="users/"; $folder ="/images/"; $filepath =$root.$UserId.$folder; if(!file_exists($root)) { mkdir($root,0777); chmod($root,0777); } if(!file_exists($root.$UserId)) { mkdir($root.$UserId,0777); chmod($root.$UserId,0777); } if(!file_exists($root.$UserId.$folder)) { mkdir($root.$UserId.$folder,0777); chmod($root.$UserId.$folder,0777); } if(!file_exists($filepath)) { mkdir($filepath,0777); chmod($filepath,0777); } class File_Streamer { private $fileName; private $contentLength; private $path; private $UserId; public function __construct() { if (array_key_exists('HTTP_X_FILE_NAME', $_SERVER) && array_key_exists('CONTENT_LENGTH', $_SERVER)) { $this->fileName = md5($_SERVER['HTTP_X_FILE_NAME']).'.jpeg'; $this->contentLength = $_SERVER['CONTENT_LENGTH']; } else { throw new Exception("Error retrieving headers"); } } public function setDestination($p) { $this->path = $p; } public function receive($UserId) { if (!$this->contentLength > 0) { throw new Exception('No file uploaded!'); } file_put_contents( $this->path . $this->fileName, file_get_contents("php://input") ); $setuserbackground= mysql_query("UPDATE WiiS_Background SET LargePicture = 'http://wiistream.com/$this->path . $this->fileName' WHERE UserId = '$UserId'"); $setuserbackgroundss= mysql_query("UPDATE WiiS_Background SET SmallPicture = 'http://wiistream.com/$this->path . $this->fileName' WHERE UserId = '$UserId'"); $setuserbackgrounds = mysql_query("INSERT INTO WiiS_Backgrounds(UserId,Thumb,Image) VALUES('$UserId','http://wiistream.com/$this->path . $this->fileName','http://wiistream.com/$this->path . $this->fileName')"); return true; } } $ft = new File_Streamer(); $ft->setDestination($filepath); $ft->receive($UserId); } else { echo "NO ONE IS IN THE DATABASE!"; } } DEFAULT.css /* Document : default Created on : 25-Sep-2010, 08:33:58 Author : phil Description: Purpose of the stylesheet follows. */ /* TODO customize this sample style Syntax recommendation http://www.w3.org/TR/REC-CSS2/ */ body { font: 0.8em/1em "trebuchet MS", arial, sans-serif; color: #777; } h1 { font-size: 1.6em; margin: 30px 0; padding: 0; } h2 { font-size: 1.4em; padding: 0 0 6px 0; margin: 0; border-bottom: solid 1px #ccc; } h3 { font-size: 1.2em; margin: 0 0 10px 0; padding: 0; } p { margin: 0; padding: 0; } form { padding: 0 0 30px 0; } #wrap { width: 100%; margin: 0 auto; } #fileDrop { width: 300px; height: 300px; border: dashed 2px #ccc; background-color: #fefefe; float: left; color: #ccc; } #fileDrop p { text-align: center; padding: 125px 0 0 0; font-size: 1.6em; } #files { margin: 0 0 0 400px; width: 30%; height:30% padding: 20px 20px 40px 20px; border: solid 2px #ccc; background: #fefefe; min-height: 240px; position: relative; } #fileDrop, #files { -moz-box-shadow: 0 0 20px #ccc; } #fileList { list-style: none; width: 75px; height:75px; padding: 0; margin: 0; } #fileList li { width: 70px; height:70px; margin: 0; padding: 10px 0; margin: 0; overflow: auto; border-bottom: solid 1px #ccc; position: relative; } #fileList li img { width: 65px; height:65px; border: solid 1px #999; padding: 6px; margin: 0 10px 0 0; background-color: #eee; display: block; float: left; } #reset { position: absolute; top: 10px; right: 10px; color: #ccc; text-decoration: none; } #reset:hover { color: #333; } #upload { color: #fff; position: absolute; display: block; bottom: 10px; right: 10px; width: auto; background-color: #777; padding: 4px 6px; text-decoration: none; font-weight: bold; -moz-border-radius: 6px; } #upload:hover { background-color: #333; } .loader { position: absolute; bottom: 10px; right: 0; color: orange; } .loadingIndicator { width: 0%; height: 2px; background-color: orange; position: absolute; bottom: 0; left: 0; } .imagePreview { width:auto; height:auto; padding: 10px; border: solid 1px #ccc; position: absolute; background-color: white; } .imagePreview img { width:auto; height:auto; display: block; margin: 0 auto; }
  10. Hi can you guys help me with this again.. Im trying to do a simple hide and show. with as2 its objectsname._visible=true; or false; html css <style> #this{ visibility:hidden; visibility:visible; } </style> What i am trying to do is, hide the upload button until the file is selected, once it is selected, then we see the upload button. Its something simple and it seems so hard! <style> #this{ visibility:hidden; visibility:visible; } </style> <script type="text/javascript"> function check_if_file_selected() { var file = document.getElementById("selectfile"); if(file.value =="") { alert( 'LETS GET THE IMAGE FILE'); } else { alert('WE ALREADY HAVE A IMAGE FILE SELECTED'); } } </script> <form enctype="multipart/form-data" action="upload_background.php?UserId=5" method="POST"> <input id ="selectfile" onclick="check_if_file_selected()" type="file" name="x" accept="image/*"/> <button id="uploadback" type="submit" >click</button> </form>
  11. That makes scene. its the same thing. I can just use the $_GET to get the string and then just set it again if needed.. in php
  12. Thank you guys you are a big help! In flash i can pass strings to strings, so if this.text.string ="SOMETHING"; i can call that sting anytime i want and place it any where. for example this.newtext.string =""; <--NOTHING but if i need that to == what this.text.string is i would just do this. this.text.string=this.newtext.string; can I do that in html? you see my whole site was made in flash, and most of it still is, but I am trying to make it again in html5 and php and html and javascript..
  13. I want to allow users to insert into database but i have to prevent them from inserting in tags, how can I do that? I understand the post, and how to insert, but how do I check that no tags where wrote in? This is a ok inseart <td>this is not a ok insert</td> or any other tag
  14. Thank you Admin That was hard but it worked! <!-- THIS IS THE FOOTER START--> <div id="thumbnails_wrapper"> <div id="outer_container"> <div class="thumbScroller"> <div class="container"> <? try { // Proceed knowing you have a logged in user who's authenticated. $user_profiles = $facebook->api('/'.$user_id.'/friends?access_token='. $access_token .'&fields=id,name'); } catch (FacebookApiException $e) { error_log($e); $user = null; } $friendsList = array(); foreach( $user_profiles as $key=>$value) { foreach ($value as $fkey=>$fvalue) { $friendsList[] = $fvalue['id']; $friendsName[] = $fvalue['name']; ?> <div class="content"> <div><a href="/profile?id=<? echo $fvalue['id'] ?>"><img src="http://graph.facebook.com/<? echo $fvalue['id'] ?>/picture?type=large" title="<? echo $fvalue['name'] ?>" alt="<? echo $fvalue['name'] ?>" class="thumb" /></a></div> </div> <? } } ?> </div> </div> </div> </div> </div> <!-- THIS IS THE FOOTER END-->
  15. I just can not seem to get it.. it will not echo any value i just do not see what i am doing wrong, try { // Proceed knowing you have a logged in user who's authenticated. $user_profiles = $facebook->api('/'.$user_id.'/friends?access_token='. $access_token .'&fields=id,name'); } catch (FacebookApiException $e) { error_log($e); $user = null; } $profile = array ($user_profiles); foreach( $profile as $name => $value) { ?> <div class="content"> <div><a href="/profile?id=<? echo $value['id'] ?>"><img src="http://graph.facebook.com/<? $value['id'] ?>/picture?type=large" title="<? echo $value['name'] ?>" alt="<? echo $value['name'] ?>" class="thumb" /></a></div> </div> <? }
  16. Im not understanding. try { // Proceed knowing you have a logged in user who's authenticated. $user_profile = $facebook->api('/'.$user_id.'/friends?access_token='. $access_token .'&fields=id,name'); } catch (FacebookApiException $e) { error_log($e); $user = null; } $profile = array ($user_profile); foreach( $profile as $name => $value) { if( !is_array($value) ) { echo $profile->$name = $value; } else { echo $child = $profile->addChild( $name ); } }
  17. Ok here is the code im working with. as it it right now it is displaying xml but I want to just echo tags in the array. but also it can keep making new. I do not know how to explain this. because I do not understand! try { // Proceed knowing you have a logged in user who's authenticated. $user_profile = $facebook->api('/'.$user_id.'/friends?access_token='. $access_token .'&fields=id,name'); } catch (FacebookApiException $e) { error_log($e); $user = null; } $profile = array ($user_profile); echo $name[] = $user_profile['name']; $xml = new SimpleXMLElement('<root/>'); arrayToXML( $xml, $profile ); echo $xml->asXML(); function arrayToXML( SimpleXMLElement &$xml, $array ) { foreach( $array as $name => $value) { if( !is_array($value) ) { $xml->$name = $value; } else { $child = $xml->addChild( $name ); arrayToXML( $child, $value ); } } } Now this works as xml.. and it displays a list of my friends. <root><0><data><0><id>520510214</id><name>Angela L Taylor</name><first_name>Angela</first_name><last_name>Taylor</last_name><gender>female</gender><link>http://www.facebook.com/angela.martin.taylor</link><picture><data><url>https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc6/186371_520510214_2129561780_q.jpg</url><is_silhouette></is_silhouette></data></picture></0><1><id>1627082340</id><name>April Mosier</name><first_name>April</first_name><last_name>Mosier</last_name><gender>female</gender><link>http://www.facebook.com/amosier2372</link><picture><data><url>https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash4/195320_1627082340_1747498710_q.jpg</url><is_silhouette></is_silhouette></data></picture></1><2><id>100000117823779</id><name>Barb Pitman</name><first_name>Barb</first_name><last_name>Pitman</last_name><gender>female</gender><link>http://www.facebook.com/barb.pitman.7</link><picture><data><url>https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash4/203336_100000117823779_2777051_q.jpg</url><is_silhouette></is_silhouette></data></picture></2><3><id>100000215611178</id><name>Rob Puckett</name><first_name>Rob</first_name><last_name>Puckett</last_name><gender>male</gender><link>http://www.facebook.com/robpuk56</link><picture><data><url>https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc6/623477_100000215611178_1780460535_q.jpg</url><is_silhouette></is_silhouette></data></picture></3><4><id>100000545723958</id><name>Dodi Thornburg</name><first_name>Dodi</first_name><last_name>Thornburg</last_name><gender>female</gender><link>http://www.facebook.com/dodi.thornburg</link><picture><data><url>https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash4/372752_100000545723958_586143298_q.jpg</url><is_silhouette></is_silhouette></data></picture></4><5><id>100000654467543</id><name>Corie Bradburn</name><first_name>Corie</first_name><last_name>Bradburn</last_name><gender>female</gender><link>http://www.facebook.com/corie.bradburn</link><picture><data><url>https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash4/371610_100000654467543_700847477_q.jpg</url><is_silhouette></is_silhouette></data></picture></5><6><id>100000811812567</id><name>Casey Taylor</name><first_name>Casey</first_name><last_name>Taylor</last_name><gender>male</gender><link>http://www.facebook.com/casey.taylor.90834</link><picture><data><url>https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc6/260700_100000811812567_713679838_q.jpg</url><is_silhouette></is_silhouette></data></picture></6><7><id>100000838601612</id><name>Arju Dares</name><first_name>Arju</first_name><last_name>Dares</last_name><gender>male</gender><link>http://www.facebook.com/arju.dares</link><picture><data><url>https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash4/211555_100000838601612_2027547717_q.jpg</url><is_silhouette></is_silhouette></data></picture></7><8><id>100000898203770</id><name>Kary Kiser</name><first_name>Kary</first_name><last_name>Kiser</last_name><gender>female</gender><link>http://www.facebook.com/kary.kiser</link><picture><data><url>https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash4/195333_100000898203770_839410129_q.jpg</url><is_silhouette></is_silhouette></data></picture></8><9><id>100001335667661</id><name>Joshua Bigboy Springman</name><first_name>Joshua</first_name><last_name>Springman</last_name><gender>male</gender><link>http://www.facebook.com/joshua.springman</link><picture><data><url>https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash4/371691_100001335667661_437761407_q.jpg</url><is_silhouette></is_silhouette></data></picture></9><10><id>100001946559796</id><name>Chris Teer</name><first_name>Chris</first_name><last_name>Teer</last_name><gender>male</gender><link>http://www.facebook.com/cteer2</link><picture><data><url>https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc6/203180_100001946559796_176613_q.jpg</url><is_silhouette></is_silhouette></data></picture></10><11><id>100004489140875</id><name>Gabriella Ray</name><first_name>Gabriella</first_name><last_name>Ray</last_name><gender>female</gender><link>http://www.facebook.com/gabriella.ray.75</link><picture><data><url>https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash4/369519_100004489140875_774270663_q.jpg</url><is_silhouette></is_silhouette></data></picture></11></data><paging><next>https://graph.facebook.com/100001957015772/friends?fields=id,name,first_name,last_name,picture,gender,link&limit=21&offset=22&__after_id=100004489140875</next><previous>https://graph.facebook.com/100001957015772/friends?fields=id,name,first_name,last_name,picture,gender,link&limit=1&offset=0&__before_id=520510214</previous></paging></0></root> But what I want to do. is I want to just echo each and every one of the arrays [0] - how ever many there are [5000] and then I want to echo the name and the ID for each array But I do not understand how to do this can any one help me? and my end resault would be this. <div class="content"> <div><a href="/profile/id1"><img src="USERIMAGE1" title="USERNAME1" alt="USERNAME1" class="thumb" /></a></div> </div> <div class="content"> <div><a href="/profile/id2"><img src="USERIMAGE2" title="USERNAME2" alt="USERNAME2" class="thumb" /></a></div> </div> <div class="content"> <div><a href="/profile/id3"><img src="USERIMAGE3" title="USERNAME3" alt="USERNAME3" class="thumb" /></a></div> </div> <div class="content"> <div><a href="/profile/id4"><img src="USERIMAGE4" title="USERNAME4" alt="USERNAME4" class="thumb" /></a></div> </div>
  18. Well couldn't he place the form tags in a div tags he has 4 forms tags and he wants to put it all in one? I think that's what hes saying. <form id="one"> </form> <form id="two"> </form> <form id="three"> </form> <form id="four"> </form> i say if statements is it php? it has to be simple. but I don't see any code to understand what hes doing. I would just call the tag when i need it, and if it changes call another.
  19. <form name="frm"> <table style="border:solid green 1px"> <tr><td align=center><input type="checkbox" name="chk" onclick="javascript:apply();"></td></tr>I agree Terms and Conditions <tr><td align=center><input type="button" name="sub" onclick="javascript:callfuction();" value="submit" disabled></td></tr> <tr><td align=center>&copy<a href="http://www.hscripts.com" style="color:#3D366F;text-decoration:none;cursor:pointer;font-size:13px">hscripts.com</a></td></tr></table> </form> <script type="text/javascript"> function callfunction() { var _width = screen.width; var _height = screen.height; var win = window.open("somepage.php", "_top", "top=0, left=0, screenX=0, screenY=0, width="+_width+",height="+_height+",toolbars=0"); } function apply() { document.frm.sub.disabled=true; if(document.frm.chk.checked==true) { document.frm.sub.disabled=false; } if(document.frm.chk.checked==false) { document.frm.sub.enabled=false; } } </script>
  20. see if you can use any of this code to try to do what you want.. i didnt understand to well <style type="text/css"> span.About { background:url(images/ABOUT.png) top center no-repeat; display:block; height:26px; border:none; } span.AboutMore { background:url(images/ABOUT.png) top center no-repeat; display:block; height:26px; border:none; } </style> <? $checked = "checked"; if (!empty($_POST['newClient'])) { echo '$checked'; ?> <input name="newClient" type="radio" id="id_radio1" value= "check1" checked="<? $checked ?>" onclick="javascript:Function_Name();"/> New Client <? } else { ?> <input id="id_radio2" type="radio" value= "check2" name="returningClient" checked="<? $checked ?>" onclick="javascript:Function_Name_2();" />Returning Client <? } ?> <br /> THIS IS MY DROP DOWN MENU TO DISPLAY.<br /> <select> <option>Seleccionar</option> <option value="Casa" onclick="javascript:Function_Name();"><a href="#">New Client</a></option> <option value="Casa" onclick="javascript:Function_Name_2();"><a href="#">Returning Client</a></option> </select><br /> THIS IS MY BUTTON TO DISPLAY MY FUNCTION BLOCK!<br /> <!--THIS IS USING THE CSS CLASS FOR YOUR BUTTON UP AT THE TOP AND THE JAVA SCRIPT onclick AT THE BOTTOM--> <span class="About" onclick="javascript:Function_Name();"><a href="#"></a></span><br /> <!--THIS IS USING THE CSS CLASS FOR YOUR BUTTON UP AT THE TOP AND THE JAVA SCRIPT onclick AT THE BOTTOM--> <span class="AboutMore" onclick="javascript:Function_Name_2();"><a href="#"></a></span><br /> <div id="myfuction" style="display: none;padding: 5px;"> THIS IS MY FUCTION TEST BLOCK I WANT TO DISPLAY! NEW CLIENT </div> <div id="myfuction_2" style="display: none;padding: 5px;"> THIS IS MY FUCTION TEST BOCK 2 I WANT TO DISPLAY! RETURNING CLIENT </div> <script type="text/javascript"> function Function_Name() { if(document.getElementById('myfuction').style.display=='none') { //THIS IS SHOWING THE DIV TAG div = document.getElementById('myfuction'); div.style.display = "block"; //THIS IS HIDING THE OTHER DIV TAG AND ONLY SHOWING YOU THE ONE div = document.getElementById('myfuction_2'); div.style.display = "none"; } else { //THIS IS HIDING THE DIV TAG IF YOU CLICK IT TWICE IT OPENS IT SHUTS div = document.getElementById('myfuction'); div.style.display = "none"; } } function Function_Name_2() { if(document.getElementById('myfuction_2').style.display=='none') { //THIS IS SHOWING THE DIV TAG div = document.getElementById('myfuction_2'); div.style.display = "block"; //THIS IS HIDING THE OTHER DIV TAG AND ONLY SHOWING YOU THE ONE div = document.getElementById('myfuction'); div.style.display = "none"; } else { //THIS IS HIDING THE DIV TAG IF YOU CLICK IT TWICE IT OPENS IT SHUTS div = document.getElementById('myfuction_2'); div.style.display = "none"; } } </script>
  21. my bad. just quick talk. <style type="text/css"> span.About { background:url(images/ABOUT.png) top center no-repeat; display:block; height:26px; border:none; } span.AboutMore { background:url(images/ABOUT.png) top center no-repeat; display:block; height:26px; border:none; } </style> THIS IS MY DROP DOWN MENU TO DISPLAY.<br /> <select> <option>Seleccionar</option> <option value="Casa" onclick="javascript:Function_Name();"><a href="#">Casa</a></option> <option value="Casa" onclick="javascript:Function_Name_2();"><a href="#">Departamento</a></option> </select><br /> THIS IS MY BUTTON TO DISPLAY MY FUNCTION BLOCK!<br /> <!--THIS IS USING THE CSS CLASS FOR YOUR BUTTON UP AT THE TOP AND THE JAVA SCRIPT onclick AT THE BOTTOM--> <span class="About" onclick="javascript:Function_Name();"><a href="#"></a></span><br /> <!--THIS IS USING THE CSS CLASS FOR YOUR BUTTON UP AT THE TOP AND THE JAVA SCRIPT onclick AT THE BOTTOM--> <span class="AboutMore" onclick="javascript:Function_Name_2();"><a href="#"></a></span><br /> <!--THIS IS THE DIV TAG WITH A ID THAT THE JAVA SCRIPT IS LOOKING FOR--> <div id="myfuction" style="display: none;padding: 5px;"> THIS IS MY FUCTION TEST BLOCK I WANT TO DISPLAY! </div> <!--THIS IS THE DIV TAG WITH A ID THAT THE JAVA SCRIPT IS LOOKING FOR--> <div id="myfuction_2" style="display: none;padding: 5px;"> THIS IS MY FUCTION TEST BOCK 2 I WANT TO DISPLAY! </div> <script type="text/javascript"> function Function_Name() { if(document.getElementById('myfuction').style.display=='none') { //THIS IS SHOWING THE DIV TAG div = document.getElementById('myfuction'); div.style.display = "block"; //THIS IS HIDING THE OTHER DIV TAG AND ONLY SHOWING YOU THE ONE div = document.getElementById('myfuction_2'); div.style.display = "none"; } else { //THIS IS HIDING THE DIV TAG IF YOU CLICK IT TWICE IT OPENS IT SHUTS div = document.getElementById('myfuction'); div.style.display = "none"; } } function Function_Name_2() { if(document.getElementById('myfuction_2').style.display=='none') { //THIS IS SHOWING THE DIV TAG div = document.getElementById('myfuction_2'); div.style.display = "block"; //THIS IS HIDING THE OTHER DIV TAG AND ONLY SHOWING YOU THE ONE div = document.getElementById('myfuction'); div.style.display = "none"; } else { //THIS IS HIDING THE DIV TAG IF YOU CLICK IT TWICE IT OPENS IT SHUTS div = document.getElementById('myfuction_2'); div.style.display = "none"; } } </script>
  22. <form method="post" action=""> <label for="titulo">Titulo de Listado: </label> <input type="text" placeholder="Ave. Jalisco #560" name="titulo"> <br /> <label for="Direccion">Direccion: </label> <input type="text" placeholder="Ave. Jalisco #560 Colonia Cacho Tijuana Baja California Mexico 22407" name="direccion"> <br /> <label for="email">Correo Electronico: </label> <input type="email" placeholder="123JuanCastro@Tucorreo.com" name="email"> <br /> <label for="accion">Accion Deseada: </label> <select> <option value="Vender">Vender</option> <option value="Rentar">Rentar: </option> </select> <br /> <label for="Descripcion">Descripcion del Inmueble</label> <br /> <textarea placeholder="Descripcion completa del inmueble" name="descripcion" rows=8 cols=30 style="max-width:400px; width:400px; height:150px; font-family:'sansation_light'; max-height:150px; overflow:auto; margin-top:10px;"></textarea> <br /> <?php $do = 'Casa'; //THIS IS MAKING IT TRUE AREADY YOU NEED TO TELL IT WHEN IT IS TRUE OF FALSE $do1 = 'Depto';//THIS IS MAKING IT TRUE AREADY YOU NEED TO TELL IT WHEN IT IS TRUE OF FALSE ?> <label for="inmueble">Tipo de Inmueble: </label> <select> <option>Seleccionar</option> <option value="Casa">Casa</option> <option value="Depto">Departamento</option> <option value="Oficina">Oficina</option> <option value="Terreno">Terreno</option> <option value="Nave">Nave Indust.</option> </select> <br /> <?php if ($do =='Casa') { echo '<label for="cuartos"># de Recamaras: </label> <input type="text" placeholder="3" name="cuartos">'; } ?><br /> <?php if ($do1 =='Depto') { echo '<label for="baños">Cantidad de Baños: </label> <input type="text" placeholder="1.5" name="baños">'; } ?><br /> <label for="Superficie">Superficie<sup>2</sup> de Inmueble: </label> <input type="text" placeholder="150" name="superficie"> <select> <option value="sqf">sqf</option> <option value="mts">mts</option> </select> <br /> <label for="construccion">Superficie<sup>2</sup> de Construccion: </label> <input type="text" placeholder="150" name="superficie"> <select> <option value="sqf">sqf</option> <option value="mts">mts</option> </select> <br /> <label for="precio">Precio: </label> <input type="text" placeholder="$1500" name="precio"> <select> <option value="MXN">MXN</option> <option value="USD">USD</option> </select> <br /> </form> I would user div tags for this.. give them som ID and then java it.. Here is a simple code! on minute
  23. Hi. Ok I have this script I am working on, so I can download any file from my site to my computer.. I am trying to make a ring tone system. I have the uploader that allows the user to upload a ringtone in file format mp3 reasons being mp3 streams, so the other users can hear the ringtone on the site. and this is the download script.. <? $filename = $_GET['filename']; $ext = $_GET['ext']; if(empty($filename)) { exit(); } else { $test=explode(".", $filename); $file_extension = strtolower(substr(strrchr($filename,"."),1)); header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); header("Content-Type: $ctype"); header("Content-Disposition: attachment; filename=\"".basename($filename.$ext)."\";" ); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize($filename)); readfile("$filename"); exit(); } ?> So we know the file that was uploaded was a mp3, but the file we need for our phone is not a mp3, say we have a Iphone and the file format is .m4r I thought just rename the ext. from filename.mp3 to filename.m4r and i thought that just might work, but it will not! so i have to add a converter here some how preview of the ringtones uploaded are here http://wiistream.com just hit the ringtone button in the header. I have two they are mp3 but if you click the download button it opens the choice system, that lets you pic the ext format ext. would any one be willing to help finish this part out I need to know how to convert maybe ffmpeg i need help with this!
  24. echo it as a html page link? like any html link. just as php.
×
×
  • 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.