Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
SteveJW
New Member
New Member


Joined: Oct 30, 2005
Posts: 5

PostPosted: Tue Nov 22, 2005 2:32 pm Reply with quote

I have fully patched vers 7.8 and just installed NuCalender. I am getting a blank screen when I try to go into the admin or the module

Anyone help please, I am a complete novice so please be gentle

Ta
 
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Tue Nov 22, 2005 4:46 pm Reply with quote

Try setting the $display_errors setting in config.php to true:
$display_errors=true;

That should show you the real error message.
 
View user's profile Send private message
SteveJW
PostPosted: Wed Nov 23, 2005 2:13 pm Reply with quote

Hi thanks
Have done that and get the following

Parse error: parse error, unexpected $ in .........../modules/NuCalendar/printevent.php on line 204

This is the file
Code:


<?php

/************************************************************************/
/* NuCalendar                                                           */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2003 by Bill Smith                                     */
/* http://www.vettesofthetropics.com                                    */
/*                                                                      */
/* Based on Web Calendar                                                */
/* Copyright (c) 2001 by Proverbs, LLC                                  */
/* http://www.proverbs.biz                                              */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

/*
 *  ©2001 Proverbs, LLC. All rights reserved.
 *
 *  This program is free software; you can redistribute it and/or modify it withthe following stipulations:
 *  Changes or modifications must retain all Copyright statements, including, but not limited to the Copyright statement
 *  and Proverbs, LLC homepage link provided at the bottom of this page.
 */


function PrintEventLink($op, $month, $day, $year, $row, $text)
{
   return "<a href=modules.php?name=NuCalendar&op=".$op."&month=".$month."&day=".$day."&year=".$year."&eventid=".$row[id].">".$text."</a>";

}

function PrintShortEvent($myrow, $month, $day, $year)
{
   return PrintEventLink("ShowEvent", $month, $day, $year, $myrow, $myrow[title]);
}

function PrintEvent($myrow, $month, $day, $year, $printtitlelink = 0)
{
   global $bgcolor3, $bgcolor4, $dbi, $user_prefix;

   $content = "";

   $content .= "<hr>";        
   $content .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
   $content .= "<tr>";
       $content .= "<td width=\"150\" valign=\"top\" bgcolor=\"" . $bgcolor4 ."\">"._VIEW_DAY_EVENT."</td>";
   $content .= "<td width=\"2%\" bgcolor=\"".$bgcolor4."\">&nbsp;</td>";
       $content .= "<td width=\"80%\" valign=\"top\" bgcolor=\"".$bgcolor4."\">";
   if ($printtitlelink) {
      $content .= "<b>" . PrintShortEvent($myrow, $month, $day, $year) . "</b>";
   } else {
      $content .= $myrow[title];
   }
   $content .= "</td>";
   $content .= "</tr><tr>";
       $content .= "<td width=\"150\" valign=\"top\" bgcolor=\"".$bgcolor3."\">"._VIEW_DAY_START_TIME."</td>";
   $content .= "<td width=\"2%\" bgcolor=\"".$bgcolor3."\">&nbsp;</td>";
       $content .= "<td width=\"80%\" valign=\"top\" bgcolor=\"".$bgcolor3."\">";
   $content .= MilitaryTo12Hour($myrow[starttime]);
       $content .= "</td></tr><tr>";
   $content .= "<td width=\"150\" valign=\"top\" bgcolor=\"".$bgcolor4."\">"._VIEW_DAY_DURATION."</td>";
   $content .= "<td width=\"2%\" bgcolor=\"".$bgcolor4."\">&nbsp;</td>";
       $content .= "<td width=\"80%\" valign=\"top\" bgcolor=\"".$bgcolor4."\">";
       $content .= MilitaryTo12HourDuration($myrow[duration]) . "</td>";
   
   $content .= "</tr><tr>";
       $content .= "<td width=\"150\" valign=\"top\" bgcolor=\"".$bgcolor3."\">"._VIEW_DAY_LOCATION."</td>";
   $content .= "<td width=\"2%\" bgcolor=\"".$bgcolor3."\">&nbsp;</td>";
       $content .= "<td width=\"80%\" valign=\"top\" bgcolor=\"".$bgcolor3."\">".$myrow[location]."</td>";
   $content .= "</tr>";

   if ($printdate == 1) {
        $content .= "<tr>";
          $content .= "<td width=\"150\" valign=\"top\">"._VIEW_DAY_DATE."</td>";
          $content .= "<td width=\"2%\">&nbsp;</td>";
          $content .= "<td width=\"80%\" valign=\"top\">".$myrow[onetime_date]."</td></tr>";
   }

   $content .= "<tr>";
       $content .= "<td width=\"150\" valign=\"top\" bgcolor=\"".$bgcolor4."\">"._VIEW_DAY_CATEGORY."</td>";
   $content .= "<td width=\"2%\" bgcolor=\"".$bgcolor4."\">&nbsp;</td>";
       $content .= "<td width=\"80%\" valign=\"top\" bgcolor=\"".$bgcolor4."\">";
   $catresult = sql_query("SELECT * FROM ".$user_prefix."_nucal_categories WHERE id=".$myrow[categoryid], $dbi);   

   if ($catresult) {
      $catrow = sql_fetch_array($catresult, $dbi);
      $content .= $catrow[title]."<br><br>".$catrow[description];
   } else {
      $content .= _VIEW_DAY_NO_CAT;
   }
       $content .= "</td></tr><tr>";
       $content .= "<td width=\"150\" valign=\"top\" bgcolor=\"".$bgcolor3."\">"._VIEW_DAY_OTHER_INFO."</td>";
   $content .= "<td width=\"2%\" bgcolor=\"".$bgcolor3."\">&nbsp;</td>";
       $content .= "<td width=\"80%\" valign=\"top\" bgcolor=\"".$bgcolor3."\">".$myrow[fulldesc]."&nbsp;</td>";
   $content .= "</tr></table>";

   return $content;
}

function PrintEventFooter($op, $month, $day, $year, $eventid, $showprintlink, $printop, $linkup)
{
   echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">";
         echo "<tr>";
        echo "<td width=\"17%\">";
   PrintSubmitEventLink();
        echo "</td>";
        echo "<td width=\"17%\">&nbsp;</td>";
        echo "<td width=\"16%\">";

   if ($showprintlink == 1) {
                echo "<a href=\"#\" onClick=window.open(\"modules.php?name=NuCalendar&op=".$printop."&month=".$month."&day=".$day."&year=".$year."&printing=1&eventid=".$eventid."\",\"ec_window_11190874\",\"width=800,height=600,resizable=yes,scrollbars=1,toolbar=1\")>"._PRINTER_FRIENDLY_VERSION."</a>";
   }
   echo "</td>";
        echo "<td width=\"17%\" align=\"right\">";
        echo "&nbsp;</td>";
        echo "<td width=\"17%\" align=\"right\">";
        echo "<a href=modules.php?name=NuCalendar&op=".$op."&month=".$month."&day=".$day."&year=".$year.">".$linkup."</a>";
        echo "</td>";
         echo "</tr>";
       echo "</table>";
}

function PrintSubmitEventLink()
{
   global $user_prefix, $dbi;
   $result = sql_query("SELECT * FROM ".$user_prefix."_nucal_options WHERE 1", $dbi);
        $row = sql_fetch_array($result, $dbi);
        if ($row[allow_user_submitted_events] == 1) {
      echo "<a href=modules.php?name=NuCalendar&op=SubmitEvent>"._SUBMIT_EVENT_INFO."</a>";
   }
}

function ShowEventForm($formaction, $mydatarow, $eventid, $formsubmitbutton, $onetimeevent = "", $month="", $day="", $year="", $formactiondelete="", $showapproved = 0)
{
   if (!isset($month) || $month == "" || $month > 12 || $month < 1)
   {
      $month = date("m");
   }
   if (!isset($year) || $year == "" || $year < 1972 || $year > 2036)
   {
      $year = date("Y");
   }
   if (!isset($day) || $day == "")
   {
      $day = date("d");
   }

   global $user_prefix, $dbi, $AllowableHTML;
?>

<form action="<?php echo $formaction; ?>" method="POST">
<table width="100%" cellspacing=0 border=0 cellpadding=0>
        <tr align="left">
                <td width="30%"></td>
                <td width="10"></td>
                <td width="70%"></td>
        </tr>
        <tr align="left">
                <td width="30%"><?php echo _VIEW_DAY_EVENT; ?></td>
                <td width="10"></td>
                <td width="70%"><input type="text" name="title" value="<?php echo $mydatarow[title]; ?>" size=30></td>
        </tr>
        <tr align="left">
                <td width="30%"><?php echo _VIEW_DAY_LOCATION; ?></td>
                <td width="10"></td>
                <td width="70%"><input type="text" name="location" value="<?php
echo $mydatarow[location]; ?>" size=30></td>
        </tr>
                <tr align="left">
                <td width="30%" valign="top"><?php echo _VIEW_DAY_OTHER_INFO; ?></td>
                <td width="10"></td>
                <td width="70%"><textarea rows="7" name="fulldesc" cols="45"><?php echo $mydatarow[fulldesc]; ?></textarea>
      <?php
         echo "<br><font class=\"content\">"._ALLOWEDHTML."<br>";
             while (list($key,) = each($AllowableHTML)) echo " &lt;".$key."&gt;";
      ?>
        </tr>
                </td>
   <tr align="left">
                <td width="30%"><?php echo _VIEW_DAY_START_TIME; ?>:</td>
                <td width="10"></td>
                <td width="70%"><?php

         $hour =  MilitaryTimeGetHour($mydatarow[starttime]);
         $min = MilitaryTimeGetMinute($mydatarow[starttime]);
         $pm = MilitaryTimeIsPM($mydatarow[starttime]);

         echo "<select name=\"start_hour\">";
         for ($x = 1; $x <= 12; $x++) {
            echo "<option value=\"". $x . "\"";
            if ($x == $hour) {
               echo " selected";
            }
            if ($x == 12 && $hour == 0)
               echo " selected";

            echo ">" . $x . "</option>";
         }
         echo "</select>";
         echo ":";


Last edited by SteveJW on Wed Nov 23, 2005 2:25 pm; edited 1 time in total 
SteveJW
PostPosted: Wed Nov 23, 2005 2:14 pm Reply with quote

Thanks
 
Raven
PostPosted: Wed Nov 23, 2005 2:27 pm Reply with quote

You're missing from line 204 on.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©