![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Apr 2005
Location: California
Posts: 3
Rep Power: 0
![]() |
I wonder if anyone can help me with this????
This is the code that i am working on...
its really realy hard... to be honest i dont expect anyone to help me with this.......Just thought i'd try ![]() i do hope someone can help though *problem* i need to send this first page to the 2nd page without the ok button... **if i ever get the onchange event to work i would then combine into one page.... ------THIS IS THE FIRST PAGE------------ -----NEED TO USE ONCHANGE TO SEND TO 2ND PAGE----------------------------- <?php include_once ("../../classes/QueryClassReporting.php"); $db = new QueryClass; //edonkey availability session_start(); ?> <html> <head> <title>Live Decoying System</title> <script language="Javascript"> <?php //check if user is supposed to be here if($grant_access!=1) {?> location="../login_error.php"; //exit user <?php } ?> </script> <style type="text/css"> td { height: 20px; font: 200 12px arial; text-align: center; } </style> </head> <body bgcolor="#D3D3D3"> <div align="center"> <form name="territory_form" method="POST" action="./edonkey_decoys_form.php"> <h4>Please choose a territory/label:</h4> <?php //if universal main is logging in load ALL labels within it if(strcmp($report_to,"UNIVERSAL MUSIC")==0){ outputAllLabels(); } //else if universal europe is logging in load all the territories else{ outputAllLabels(); //outputUMITerritories(); } ?> <input type="submit" value="Next ->"> </form> </div> </body> </html> <?php function outputUMITerritories(){ $umi_territories = array("AUSTRALIA","AUSTRIA","UMI BRAZIL","DENMARK","FINLAND","FRANCE","GERMANY", "INTERNATIONAL","ITALY","JAPAN","LATIN AMERICA","NETHERLANDS","PORTUGAL","SPAIN","SWEDEN", "TAIWAN","UK","U CANADA"); echo "<select name=\"territory\">"; for($i=0;$i<count($umi_territories);$i++){ echo "<option value=\"$umi_territories[$i]\">$umi_territories[$i]"; } echo "</select>"; } function outputAllLabels(){ $umi_all_labels = array("GEFFEN","INTERSCOPE/GEFFEN/A&M","ISLAND DEF JAM","MERCURY NASHVILLE","ROAD RUNNER", "SURCO","UBER CATALOG","UNIVERSAL CLASSICS","UNIVERSAL RECORDS","AUSTRALIA","AUSTRIA","UMI BRAZIL","DENMARK","FINLAND","FRANCE","GERMANY", "INTERNATIONAL","ITALY","JAPAN","LATIN AMERICA","NETHERLANDS","PORTUGAL","SPAIN","SWEDEN", "TAIWAN","UK","U CANADA"); echo "<select name=\"territory\">"; for($i=0;$i<count($umi_all_labels);$i++){ echo "<option value=\"$umi_all_labels[$i]\">$umi_all_labels[$i]"; } echo "</select>"; } ?> ----------THIS IS THE 2ND PAGE------------- --------NEEDS TO BE SENT TO THIS---------- <?php //define $PROJECT_NAME_FIELD = 0; $PROJECT_END_FIELD = 1; //edonkey availability session_start(); include_once ("../../classes/QueryClassReporting.php"); $db = new QueryClass; $territory = $_POST['territory']; ?> <html> <head> <title>Live Decoying System</title> <script language="Javascript"> <?php //check if user is supposed to be here if($grant_access!=1 || strlen($report_to)==0) {?> location="../login_error.php"; //exit user <?php } else if((strcmp($report_to,"UNIVERSAL EUROPE")==0 || strcmp($report_to,"UNIVERSAL MUSIC")==0) && strlen($territory)==0) { ?> location = "./edonkey_decoys_main.php"; <?php } ?> </script> <style type="text/css"> td { height: 20px; font: 200 12px arial; text-align: center; } </style> </head> <body bgcolor="#D3D3D3"> <?php $referer = $_SERVER["HTTP_REFERER"] ; $todays_date = strtotime("now"); //todays date as timestamp $real_date = date("Y-m-d",$todays_date); if(strstr($referer,"edonkey_decoys_main.php")) { echo "<a href=\"$referer\">Back</a>"; //add special case with interscope/geffen if(strcmp($report_to,"GEFFEN")==0 || strcmp($territory,"GEFFEN")==0){ $db->GraphQuery("select project,project_rename,end_date_option from projects where owner = \"universal music.geffen\" and visible=1 and (end_date_option<=$real_date or end_date_option is null) order by project"); } else{ $db->GraphQuery("select project,project_rename,end_date_option from projects where owner like '%universal%$territory%' and visible=1 and (end_date_option<=$real_date or end_date_option is null) order by project"); } } else { if(strcmp($report_to,"GEFFEN")==0 || strcmp($territory,"GEFFEN")==0){ $db->GraphQuery("select project,project_rename,end_date_option from projects where owner = \"universal music.geffen\" and visible=1 and (end_date_option<=$real_date or end_date_option is null) order by project"); } else{ $db->GraphQuery("select project,project_rename,end_date_option from projects where owner like '%universal%$report_to%' and visible=1 and (end_date_option<=$real_date or end_date_option is null) order by project"); } } //get fields $projects_avail = $db->GetXAxisValues(); $field = $db->GetYAxisValues(); $decoy_project_rename = $field[0]; $decoy_end_date = $field[1]; echo "<p align=\"center\">"; echo "<form action=\"edonkey_decoys_submit.php\" method=\"POST\">"; printSelectList($projects_avail,$decoy_project_ren ame,$decoy_end_date); echo "</form></p>"; for($i=0;$i<count($decoy_project);$i++) echo "$decoy_project[$i]<BR>"; ?> </body> </html> <?php //create a submit button function makeSubmitButton() { echo "<BR><input type=\"submit\" value=\"Submit\" >"; } function validProject($arr) { $todays_date = strtotime("now()"); //todays date as timestamp //check if there is at least one active project for($i=0;$i<count($arr);$i++) { if($todays_date<=strtotime($end_arr[$i]) || $end_arr[$i]==null){ echo "$end_arr[$i]<BR>"; return true; } echo "No projects currently active"; return false; //return from function } } //create a select list function printSelectList($arr,$rename_arr,$end_arr) { if(count($arr)==0){ echo "No projects currently active"; return; } echo "Choose a project to add decoys: <BR>"; //convert today's date into timestamp echo "<select name=\"project_chosen\">"; for($i=0;$i<count($arr);$i++) { if($todays_date<=strtotime($end_arr[$i]) || $end_arr[$i]==null) { if($rename_arr[$i]) echo "<option value=\"$arr[$i]\">$rename_arr[$i]"; else echo "<option value=\"$arr[$i]\">$arr[$i]"; } } echo "</select>"; makeSubmitButton(); //include submit button } ?> Last edited by nameless; Apr 26th, 2005 at 5:13 PM. |
|
|
|
|
|
#2 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
I'd swear I just answered this question. Check the PHP forum.
|
|
|
|
|
|
#3 |
|
Professional Programmer
|
1. Use code tags
2. Post in the proper forum Welcome to the forums
__________________
Amateurs built the ark Professionals built the Titanic |
|
|
|
|
|
#4 |
|
Programming Guru
![]() ![]() ![]() |
yeah, that is a bit hard to read without the code tags.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|