Jump to content

Spikes

New Members
  • Posts

    4
  • Joined

  • Last visited

Spikes's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello all, I have a question. The server I am currently working on is on PHP 5.2 and Joomla 1.5.26. I'd like to migrate or slowly move over to 3.0 on the same server however 3.0 requires at least 5.3 (would go to 5.4). In my cpanel, it tells me "PHP 5.4+ Incompatible Applications Installed". Is it not possible to run Joomla 1.5 on PHP 5.4, or are there certain components/modules that do not work with it? The two major third party components I have installed are Community Builder and Jumi. I just don't want my site to explode if I click the button. Thanks, Rob
  2. God I feel like a moron...thank you very much. Is there any sort of online code checker that finds these errors? I had an error reporter in the file but it did not seem to pick up on this.
  3. Sorry, I snipped the code to the form end. Here is the rest of the file: <p> <!-- <p>Date format is 'YYYY-MM-DD HH:MM' with the HH:MM being optional</p>A --> <? } // end of if !isset(POST) else { // update DB and post results if (isset($_POST['id'])) { $id= str_replace("\"", "'", FormatInput($_POST['id'])) ; } if (isset($_POST['side'])) { $side= str_replace("\"", "'", FormatInput($_POST['side'])) ; if ( strcmp($side, "side_1")== 0 || strcmp($side, "side_2") == 0 || strcmp($side, "side_3") == 0 ) { $side_str = " and ahevents_scenarios.members.side = '" . $side . "'" ; } elseif ( strcmp($side,"all") == 0 ) { $side_str = "" ; } else { die("Error: invalid input") ; } $sqlstr = sprintf(" select ahevents_joom1.jos_comprofiler.cb_gameid, ahevents_joom1.jos_comprofiler.cb_bbsid, ahevents_joom1.jos_comprofiler.cb_ahmasquad, ahevents_joom1.jos_comprofiler.cb_ahseasquad, ahevents_joom1.jos_users.name, ahevents_joom1.jos_users.email, ahevents_scenarios.members.side, ahevents_scenarios.members.info from ahevents_joom1.jos_comprofiler, ahevents_joom1.jos_users, ahevents_scenarios.members where ahevents_joom1.jos_users.id = ahevents_joom1.jos_comprofiler.user_id and ahevents_joom1.jos_users.id = ahevents_scenarios.members.jid and ahevents_scenarios.members.scenario_id = '%s' %s", $id, $side_str); if (isset($_POST['sqland'])) { $sqland = str_replace("\"", "'", FormatInput($_POST['sqland'])) ; if (strcmp($sqland, "na") == 0 ) { unset($sqland) ; } } if (isset($_POST['regdate'])) { $regdate = str_replace("\"", "'", FormatInput($_POST['regdate'])) ; if (isset($sqland)) { $sqlstr .= " and ( registration.reg_date >= '" . $regdate . "' " ; } else { # do nothing } } if (isset($_POST['moddate'])) { $moddate = str_replace("\"", "'", FormatInput($_POST['moddate'])) ; if (isset($sqland)) { $sqlstr .= " " . $sqland . " registration.update_date >= '" . $moddate . "') " ; } else { # do nothing } } $result = mysql_query($sqlstr) or die("Error: ".mysql_error()."<br>Query: $sqlstr"); $output = "\015\012"; $output .= "side,name,email,gameid,bbsid,ma_squad,sea_squad,info\015\012"; while ( $row = mysql_fetch_array($result)) { $output .= '"'.$row['side'].'",' ; $output .= '"'.$row['name'].'",' ; $output .= '"'.$row['email'].'",' ; $output .= '"'.$row['cb_gameid'].'",' ; $output .= '"'.$row['cb_bbsid'].'",' ; $output .= '"'.$row['cb_ahmasquad'].'",' ; $output .= '"'.$row['cb_ahseasquad'].'",' ; $output .= '"'.$row['info'].'",' ; $output .= "\015\012"; } header("Content-type: application/vnd.ms-excel"); header("Content-disposition: attachment; filename=" . $side . "_" . date("Y-m-d") . ".csv"); print $output ; exit ; print "here<br>\n" ; } } } ?>
  4. Hi all, Having an issue with some of my php code. The goal is to have two drop-down menus, one that pulls from "ahevents_scenarios". The second pulls the "sides" involved, however it does not go into dropdown. The other issue is that even though there are only 3 sides specified, all 5 show up on the webpage. This is in Joomla. Here is my code...I think I've looked over this way too much and just can't find my errors anymore. <?php if (! $my->id) { // shouldn't even get here since menu is viewable only through logged in status print "<b>Sorry, you must be registered and logged into this site to continue</b>\n"; } else { // include standard functions and db info require_once($_SERVER['DOCUMENT_ROOT'] . "/inc/admin_functions.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/inc/db_admin_functions.php"); // which scenario we doing? -- replace with table lookup in future opendb('ahevents_scenarios'); if(!isset($_POST['action'])) { // display form $sqlstr2 = "select id, name from scenarios order by name"; $result2 = mysql_query($sqlstr2) or die("Error: ".mysql_error()."<br>Query: $sqlstr2"); // display form ?> <form name="edit_reg" method="post" action="<? echo $_SERVER[ 'REQUEST_URI' ]; ?>" <table> <tr> <td>Select Scenario: </td> <td> <select name="id"> <? while ( $row = mysql_fetch_array($result2)) { printf("<option value=\"%s\">%s</option>\n",$row['id'], $row['name']); } ?> </td></tr> <tr> <td>Which Side?</td> <td><select name="side"> <option value="side_1">side_1</option> <option value="side_2" >side_2</option> <option value="side_3" >side_3</option> <option value="all" selected>All</option> </select> </td></tr> </table> <p> <input type="submit" name="action" value="Get Registrants"> <input type="reset" value="Reset"> <input type="button" name="" value="Back" onClick="history.back()"> </form> The goal is to download the registrants into a .csv file, which it does, however due to not being able to select a "side", the .csv is blank with only headers, no content. Thanks for your time Rob
×
×
  • 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.