| Server IP : 195.130.67.5 / Your IP : 216.73.216.231 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/control/ |
Upload File : |
<?
session_start();
require_once('../includes/DbConnector.php');
require_once("../includes/UserSession.php");
require_once('../includes/SystemComponent.php');
require_once("../includes/Categories.php");
require_once('../includes/Translator.php');
require_once('../includes/Content.php');
require_once('includes/ControlSystem.php');
$connector = new DbConnector;
$session = new UserSession($connector);
$system = new SystemComponent($connector);
$categories = new Categories($connector);
$translator = new Translator($connector);
$content = new Content($connector, $system, $translator);
$csystem = new ControlSystem($connector);
require_once("../includes/RegisterGlobals.php");
$_SESSION["cms_start"] = $csystem->defineCurrentPaginationStart($start);
$_SESSION["cms_content_category"] = $csystem->defineCurrentContentCategory($content_category);
$_SESSION["cms_content_state"] = $csystem->defineCurrentContentState(1);
$_SESSION["cms_article_type"] = $csystem->defineCurrentArticleType(0);
$_SESSION["cms_table_ordering"] = $csystem->defineCurrentTableOrdering($table_ordering);
$_SESSION["cms_order_type"] = $csystem->defineCurrentTableOrderType($order_type);
$_SESSION["cms_results_per_page"] = $csystem->defineCurrentResultsPerPage($results_per_page);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?=$_SESSION["cms_site_title"]?> - Πίνακας Διαχείρισης</title>
<link href="style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/control.js"></script>
<style type="text/css">
body {background: none; text-align: center; color: #555555; font-family: Verdana, Arial, Tahoma, sans-serif; font-size: 11px;}
#container {margin: 0 auto; width: 700px; background-color: #FFFFFF; padding: 2px; min-height: 400px;}
#content_filters {margin: 0 0 0 10px; height: 23px;}
#content_filters div {float: left; margin: 0; padding: 0;}
</style>
</head>
<body>
<div id="container">
<?
// ----------------- ΔΙΑΧΕΙΡΙΣΗ ΆΡΘΡΩΝ/ΣΥΝΔΕΣΜΩΝ -----------------------
$categories->menuData = $categories->buildMenuData($translator->default_lang["id"],0);
if ($_SESSION["cms_perm_backend_manage_all_articles"]==0)
$criteria[] = "userid=".$_SESSION["cms_userid"];
if ($_SESSION["cms_content_state"]!=-1)
$criteria[] = "state=".$_SESSION["cms_content_state"];
if ($_SESSION["cms_article_type"]!=-1)
$criteria[] = "article_type=".$_SESSION["cms_article_type"];
if ($_SESSION["cms_content_category"]!=-1)
{
$childcategories = $categories->findAllChildCategories($_SESSION["cms_content_category"]);
$contition = "category_id=".$_SESSION["cms_content_category"];
foreach ($childcategories as $childcat)
$contition .= " or category_id=$childcat";
if (!empty($childcategories) and count($childcategories)>0)
$contition = "($contition)";
$criteria[] = $contition;
}
$final_criteria = "";
$cc = (!empty($criteria)?count($criteria):0);
for ($i=0; $i<$cc; ++$i)
{
if ($i == 0)
$final_criteria .= "WHERE ";
else
$final_criteria .= " and ";
$final_criteria .= $criteria[$i];
}
$result = $connector->query("SELECT *, NOW() FROM content $final_criteria ORDER BY ".$_SESSION["cms_table_ordering"]." ".$_SESSION["cms_order_type"]." LIMIT ".$_SESSION["cms_start"].",".$_SESSION["cms_results_per_page"]);
$result2 = $connector->query("SELECT * FROM content $final_criteria");
$total_results = $connector->getNumRows($result2);
$aa = $_SESSION["cms_start"];
?>
<div id="content_filters">
<div>
<form method="post" action="article_selector.php">
<input type="hidden" name="start" value="0">
<label for="content_category">Κατηγορία:</label>
<select size="1" name="content_category" OnChange="submit();">
<option value="-1" <? if ($_SESSION["cms_content_category"]==-1) echo "selected";?>>Όλα</option>
<?=$categories->buildControlMenu(0, array($_SESSION["cms_content_category"]))?>
</select>
</form>
</div>
</div>
<table id="content_table" width="700">
<thead>
<tr>
<th width="10">#</th>
<th width="420"><a href="article_selector.php?table_ordering=title&order_type=<? if ($order_type=="ASC") echo "DESC"; else echo "ASC";?>" title="Ταξινόμηση με βάση αυτή τη στήλη">Τίτλος</a><? if ($table_ordering=="title" and $order_type=="ASC") echo ' <img src="images/sort_asc.png">'; else if ($table_ordering=="title" and $order_type=="DESC") echo ' <img src="images/sort_desc.png">';?></th>
<th width="170" nowrap><a href="article_selector.php?table_ordering=category_id&order_type=<? if ($order_type=="ASC") echo "DESC"; else echo "ASC";?>" title="Ταξινόμηση με βάση αυτή τη στήλη">Κατηγορία</a><? if ($table_ordering=="category_id" and $order_type=="ASC") echo ' <img src="images/sort_asc.png">'; else if ($table_ordering=="category_id" and $order_type=="DESC") echo ' <img src="images/sort_desc.png">';?></th>
<th width="100" nowrap><a href="article_selector.php?table_ordering=created&order_type=<? if ($order_type=="ASC") echo "DESC"; else echo "ASC";?>" title="Ταξινόμηση με βάση αυτή τη στήλη">Ημερομηνία</a><? if ($table_ordering=="created" and $order_type=="ASC") echo ' <img src="images/sort_asc.png">'; else if ($table_ordering=="created" and $order_type=="DESC") echo ' <img src="images/sort_desc.png">';?></th>
</tr>
</thead>
<tbody>
<?
$row_style = 0;
while ($myrow = $connector->fetchArray($result))
{
if ($myrow['category_id']!=0)
{
$myrow2 = $categories->getCategoryById($myrow['category_id']);
$category_title = $myrow2["title"];
}
else
$category_title = "<font color=grey><Καμία></font>";
?>
<tr class="row<?=($row_style++ % 2) ?>">
<td><?=(++$aa)?></td>
<td align="left"><a href="javascript:;" onclick="update_close('<?=$myrow["id"]?>', '<?=$myrow["title"]?>')"><?=$myrow["title"]?></a></td>
<td align="left"><?=$category_title?></td>
<td align="center" nowrap><?=$system->formatDate($myrow["created"])?></td>
</tr>
<?
}
if ($aa==$start)
echo '<tr><td height="30" colspan="9" align="center" valign="middle">- Κανένα άρθρο -</td></tr>';
?>
</tbody>
<tfoot>
<tr>
<td colspan="9"><?=$csystem->pagination($total_results);?></td>
</tr>
</tfoot>
</table>
</div> <!-- container -->
</body>
</html>
<script type="text/javascript">
function update_close(id, title)
{
parent.$.fancybox.close();
if (parent.document.categories_parameters_form)
{
parent.document.categories_parameters_form.cur_cat_internal_link.value= id;
parent.document.categories_parameters_form.cur_cat_internal_link_name.value = title;
}
if (parent.document.inserteditform.content_tag)
{
parent.document.inserteditform.content_tag.value = '{content|'+id+'|0|0}';
parent.$.fancybox('#add_content_tag', {helpers:{overlay:{opacity: 0.6, closeClick: false}}});
}
}
</script>