на моя сървар всичко работи идеално !!! но като го кача в host.bg ...
ето тази част от кода я няма като отворя страницата
Код:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>Black Deamon Studios</title>
<meta name="description" content="Динамични интернет страници, уеб дизайн, уебдизайн. Dynamic web sites, web design, webdesign.">
<meta name="keywords" CONTENT="web design, webdesign, web site design, web page design, custom web design, web design company, web design agency, real estate web design, property web design, web design bulgaria, уеб дизайн, уебдизайн, уеб сайт дизайн, уеб сайт, уеб дизайн фирма, недвижими имоти, сайтове за имоти, интернет сайтове, интернет страници, уеб сайтове, уеб страници"><meta name="author" content="© 2006, Black Deamon Studios">
<meta name="robots" content="ALL">
<meta name="Revisit-After" content="1 days">
<meta name="rating" content="General">
<meta name="robots" content="index,follow">
<meta name="owner" content="webmatrix@mail.bg">
<meta name="copyright" content="Black Deamon Studios ©2006">
</head>
<base target="_self">
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<a name="top"></a>
<table border="0" width="710" id="table1" cellspacing="0" cellpadding="0" height="46">
<tr>
<td height="20" width="692" colspan="6" background="label.png" valign="top">
<p align="left"><sup>
<font face="Comic Sans MS" style="font-size: 2pt" color="#FFFFFF">
</font></sup><font color="#FFFFFF"><sup>
<a href="index_main.php" style="text-decoration: none">
<font color="#FFFFFF" face="Comic Sans MS">»</font><font size="1" face="Verdana" color="#FFFFFF"> </font>
<font face="Trebuchet MS" style="font-size: 9pt">
<span lang="bg"><font color="#FFFFFF">начало</font></span></font></a><span lang="bg"><font size="1" face="Verdana"><b> </b></font></span>
<font color="#FFFFFF" face="Comic Sans MS">»</font><font size="1" face="Verdana" color="#FFFFFF"><b> </b>
</font>
<font face="Trebuchet MS" style="font-size: 9pt" color="#FFFFFF">п</font><font face="Trebuchet MS" style="font-size: 9pt"><span lang="bg">ортфорио</span></font></sup></font></td>
</tr>
<tr>
<td height="25" width="13"> </td>
<td height="25" width="541" valign="top">
<font face="Comic Sans MS" color="#861C1C" size="4">
<b>
<font color="#861C1C">» </font> </b>Портфо<span lang="bg">л</span>ио</font></td>
<td height="25" width="49" valign="top">
<img border="0" src="images/Icons/web.png" width="27" height="31" vspace="2"></td>
<td height="25" width="49" valign="top">
<img border="0" src="images/Icons/print.png" width="27" height="31" vspace="2"></td>
<td height="25" width="46" valign="top">
<img border="0" src="images/Icons/ma.png" width="29" height="31" vspace="2"></td>
<td height="25" width="11" valign="top"> </td>
</tr>
</table>
<p><?php
$hedlines=$_GET['hedlines'];
// Include the news class (needed to display news)
include "Classes/news.class.php";
$Template = (isset($_GET['Template']) ? $_GET['Template'] : 'Default');
// This example includes news display with readmore functions
$Dir = NULL;
function GetTemplateS($whattemp,$Template,$abpath)
{
// Start Sub Function
$thetemp = "";
// Check if the template exists
// Grab the template specified
if (!is_dir($abpath . "Templates/" . $Template))
{
//starting directory
$startDir = $abpath . "Templates";
//open directory
// Silently to error Trap - TSL
if ($openDir = @opendir($startDir))
{
while($path = readdir($openDir))
{
//gets the base name of file i.e instead of /home/canivour/html/index.html its index.html
$file = basename($path);
//makes sure we dont we read the . and .. direcotry (current directory and parent directory)
if($file!="." && $file!="..")
{
//if its not a directory print out the stats (can be changed for your needs)
if(is_dir($startDir."/".$file))
{
$fullDir = $startDir."/".$file; //full directory path of file
$statCheck = stat($fullDir); //keeps info on file
$Dir = $file;
}
}
}
}
// End search for new template set
echo "<Br><font color=red><b>Error,</b> Could Not Find: \"<i>Templates/" . $Template . "/" . $whattemp . "\"</i>.<br>";
$Template = $Dir;
echo "Using: \"<i>Templates/" . $Template . "/" . $whattemp . "\"</i> Instead.</font><br>";
}
$file = @fopen($abpath . "Templates/" . $Template . "/" . $whattemp, "r")
or die("<Br><font color=red><b>Error,</b> Failed to Open: \"<i>Templates/" . $Template . "/" . $whattemp . "\"</i>.<br>");
$thetemp .= @fread($file, 200000);
@fclose($file);
// Send back the template
return $thetemp;
// End Sub Function
}
$abpath = dirname(__file__) . "/";
// Do Header
echo GetTemplateS("Header.tpl",$Template,$abpath);
// End Header
include "Config/mysql.php";
$dbl = @mysql_connect($hn, $un, $pw);
mysql_select_db($db); $chars="SET CHARACTER SET cp1251";mysql_query($chars);
$Action = (isset($_GET['Action']) ? $_GET['Action'] : 'Default'); // Check Action
// Pagnition
$Offset = (isset($_GET['Offset']) ? $_GET['Offset'] : 0); // This is used so the current article offset can be carried accross for pagnition/
// Pagnition settings
$pag=1; // set to 0 for no pagination (1 for pagination)
$Prev = "<<< Previous"; // Same as below
$Next = "Next >>>"; // This is the text that will be used for the Next word
$limit=6; // Set this to the number of Items to show (paginated or not)
// ////////// In the line below, category must appear as number. I did not find other way.
$sqlline = "SELECT * FROM " . $tprefix . "news WHERE cat='Уеб сайт' or cat = 'Шаблон'"; // the mysql query (it will need to be editing if you want to show categories)
// //////////
$numresults=mysql_query($sqlline) or die(mysql_error());
$numrows=mysql_num_rows($numresults);
if ($numrows==0){$pag=0;}
// End pagnition Settings
if ($Action == "Full")
{
// Read More Display
$knews = new knews2_getnews;
$knews->SetLimit(1); // Post Limit (3 items. Remove this line to use the amount set in the Admin CP
$knews->SetMode('News'); // News/Headlines
$knews->SetType('Item'); // Item/Category/Default
//$knews->SetTemp('Default'); // What Template set to use. LEave out to use default
$knews->GetWhat($_GET['NewsID']); // What to get (id/cat keyword etc)
$knews->ShowNews(); // Show Actual News
$knews->Finish(); // Finish news display
// End Read More
}
else
{
// Standard News Display
$knews = new knews2_getnews;
$knews->SetMode($hedlines); // News/Headlines
$knews->SetType('Category'); // Item/Category/Default
$knews->SetLimit($limit); // This will overide the Admin CP setting
if ($pag == 1) {
$knews->SetStart($Offset); // Setting first item of every page
} else {
$knews->SetNoStart(); // Setting item to last one
}
$knews->SetTemp('Default'); // What Template set to use. Leave out to use default
$knews->GetWhat('business,immovableproperty,production,lightindustry,services,tourism,hotels,machines,health,society,computers,medii,unbusiness,unimmovableproperty,unproduction,unlightindustry,untourism,unhotels,unhealth,unsociety,uncomputers,unmedii,tempsites,tempprint,tempanimation'); // What to get (id/cat keyword etc) you can specifiy multiple categories by seperating thier keywords by commas
$knews->ShowNews(); // Show Actual News
// The lines below will create the pages for pagnition.
// This will make the numbers appear above the news, just move it below the news or whereever you would like it to be displayed
if ($pag==1) {
$pages=intval($numrows/$limit);
if ($numrows%$limit) {
$pages++;
}
?><br></p>
<center><?PHP
if ($Offset>1) {
$prevoffset=$Offset-$limit;
print "<a href=\"" . $_SERVER['PHP_SELF'] . "?Offset=$prevoffset\">$Prev</a> \n";
}else{
print "$Prev \n";
}?> | <?PHP
if ($numrows>($Offset+$limit)) {
$nextoffset=$Offset+$limit;
print "<a href=\"" . $_SERVER['PHP_SELF'] . "?Offset=$nextoffset\">$Next</a> \n";
}else{
print "$Next \n";
}?><br><?PHP
for ($i=1;$i<=$pages;$i++) {
$newoffset=$limit*($i-1);
print "<a href=\"" . $_SERVER['PHP_SELF'] . "?Offset=$newoffset\">$i</a> \n";
}
print "<a href=\"" . $_SERVER['PHP_SELF'] . "?hedlines=Headlines\">Карта</a> \n";
?></center><?PHP
}
// end
$knews->Finish(); // Finish news display
// End Standard News Play
}
ето тази част от кода я няма като отворя страницата
Код:
if ($pag==1) {
$pages=intval($numrows/$limit);
if ($numrows%$limit) {
$pages++;
}
?><br></p>
<center><?PHP
if ($Offset>1) {
$prevoffset=$Offset-$limit;
print "<a href=\"" . $_SERVER['PHP_SELF'] . "?Offset=$prevoffset\">$Prev</a> \n";
}else{
print "$Prev \n";
}?> | <?PHP
if ($numrows>($Offset+$limit)) {
$nextoffset=$Offset+$limit;
print "<a href=\"" . $_SERVER['PHP_SELF'] . "?Offset=$nextoffset\">$Next</a> \n";
}else{
print "$Next \n";
}?><br><?PHP
for ($i=1;$i<=$pages;$i++) {
$newoffset=$limit*($i-1);
print "<a href=\"" . $_SERVER['PHP_SELF'] . "?Offset=$newoffset\">$i</a> \n";
}
print "<a href=\"" . $_SERVER['PHP_SELF'] . "?hedlines=Headlines\">Карта</a> \n";
?></center><?PHP
}
// end
$knews->Finish(); // Finish news display
// End Standard News Play
}