News:

CPG Release 1.6.29
During HTML5 upload, keep pseudo blank code 200 messages from triggering error condition
added Russian language
correct failure to use theme menu icons in album manager
minor vulnerabilities mitigation

Main Menu

Problem: adding own site (tabletagproblem)

Started by seros, December 25, 2004, 12:12:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

seros

Hello, so I wanted to add a calender site for my CPG. But with the include in the table it won't work. How can I fix this problem?

calender.php

<?php
// ------------------------------------------------------------------------- //
// Coppermine Photo Gallery 1.3.0  miniCMS                                   //
// ------------------------------------------------------------------------- //
// Copyright (C) 2004 Tarique Sani <tarique@sanisoft.com>,                   //
// Amit Badkas <amit@sanisoft.com>                                           //  
// http://www.chezgreg.net/coppermine/                                       //
// ------------------------------------------------------------------------- //
// 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, or         //
// (at your option) any later version.                                       //
// ------------------------------------------------------------------------- // 

define('IN_COPPERMINE'true);
require(
'include/init.inc.php');

pageheader("Kalender");

starttable("100%""Kalender" 3);

print <<<EOT
<tr><td class="tableb" >
<?php include('cal.php3'); ?>

</td></tr>
EOT;

endtable();

pagefooter();
ob_end_flush();
?>


cal.php3

<?php

require("./api/cal.api");

?>

<html>
<head>
  <title>Eventkalender</title>

<style type="text/css">
<!--
a:link { text-decoration:none; font-weight:bold; color:#0080C0; }
a:hover { text-decoration:none; font-weight:bold; color:#000000; }
a:active { text-decoration:none; font-weight:bold; color:#000000; }
-->
</style>
 
</head>

<?php js_popup(); ?>

<body bgcolor="#ffffff">

<div align="center">
<?php

if( !$y $y date("Y");
if( !
$m $m date("m");

$mymonth = new month($m,$y);


echo 
"<h3>$mymonth->month_name</h3><br>\n";


echo 
"<table width=\"85%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n";
echo 
"<tr>\n";
echo 
"  <td bgcolor=\"#000000\">\n";

$mymonth->draw(array("cellspacing" => "2" "cellpadding" => "2" ,
                      
"top_row_align" => "center" "table_height" => "300px" ,
                      
"top_row_cell_height" => 20 "bgcolor" => "#CBD7DE" ,
                      
"row_align" => "left" "row_valign" => "top" ,
                      
"font_size" => "-1") );

echo 
"  </td>\n";
echo 
"</tr>\n";
echo 
"</table>\n";


?>

</div>

<div align="center">
<a href="./cal.php3?m=<?php echo $mymonth->prevmonth?>&y=<?php echo $mymonth->prevyear?>"><img vspace='2' hspace='0' src="graphics/monrueck.jpg"></a>&nbsp;
<a href="admin/post_event_all.php3"><img align="middle" vspace="2" src="graphics/event_eintragen.gif"></a>
<a href="./cal.php3?m=<?php echo $mymonth->nextmonth?>&y=<?php echo $mymonth->nextyear?>"><img vspace='2' hspace='0' src="graphics/monvor.jpg"></a>
</div>

</body>
</html>


Thanks so far

Nibbler

Try actually including it. The calander is a page in its own right so it's not going to work very well.


print <<<EOT
<tr><td class="tableb" >
<?php include('cal.php3'); ?>
</td></tr>
EOT;



echo '<tr><td class="tableb" >';
include('cal.php3');
echo '</td></tr>';

seros

Thanks Nibbler, now it is workling hope to get it working complete ... :)