Example #1
0
 function __construct()
 {
     global $conn, $Language;
     $GLOBALS["Page"] =& $this;
     // Language object
     if (!isset($Language)) {
         $Language = new cLanguage();
     }
     // Parent constuctor
     parent::__construct();
     // Table object (news)
     if (!isset($GLOBALS["news"])) {
         $GLOBALS["news"] =& $this;
         $GLOBALS["Table"] =& $GLOBALS["news"];
     }
     // Initialize URLs
     $this->ExportPrintUrl = $this->PageUrl() . "export=print";
     $this->ExportExcelUrl = $this->PageUrl() . "export=excel";
     $this->ExportWordUrl = $this->PageUrl() . "export=word";
     $this->ExportHtmlUrl = $this->PageUrl() . "export=html";
     $this->ExportXmlUrl = $this->PageUrl() . "export=xml";
     $this->ExportCsvUrl = $this->PageUrl() . "export=csv";
     $this->ExportPdfUrl = $this->PageUrl() . "export=pdf";
     $this->AddUrl = "newsadd.php";
     $this->InlineAddUrl = $this->PageUrl() . "a=add";
     $this->GridAddUrl = $this->PageUrl() . "a=gridadd";
     $this->GridEditUrl = $this->PageUrl() . "a=gridedit";
     $this->MultiDeleteUrl = "newsdelete.php";
     $this->MultiUpdateUrl = "newsupdate.php";
     // Page ID
     if (!defined("EW_PAGE_ID")) {
         define("EW_PAGE_ID", 'list', TRUE);
     }
     // Table name (for backward compatibility)
     if (!defined("EW_TABLE_NAME")) {
         define("EW_TABLE_NAME", 'news', TRUE);
     }
     // Start timer
     if (!isset($GLOBALS["gTimer"])) {
         $GLOBALS["gTimer"] = new cTimer();
     }
     // Open connection
     if (!isset($conn)) {
         $conn = ew_Connect();
     }
     // List options
     $this->ListOptions = new cListOptions();
     $this->ListOptions->TableVar = $this->TableVar;
     // Export options
     $this->ExportOptions = new cListOptions();
     $this->ExportOptions->Tag = "span";
     $this->ExportOptions->TagClassName = "ewExportOption";
     // Other options
     $this->OtherOptions['addedit'] = new cListOptions();
     $this->OtherOptions['addedit']->Tag = "span";
     $this->OtherOptions['addedit']->TagClassName = "ewAddEditOption";
     $this->OtherOptions['detail'] = new cListOptions();
     $this->OtherOptions['detail']->Tag = "span";
     $this->OtherOptions['detail']->TagClassName = "ewDetailOption";
     $this->OtherOptions['action'] = new cListOptions();
     $this->OtherOptions['action']->Tag = "span";
     $this->OtherOptions['action']->TagClassName = "ewActionOption";
 }
Example #2
0
 function __construct()
 {
     global $conn, $Language;
     $GLOBALS["Page"] =& $this;
     // Language object
     if (!isset($Language)) {
         $Language = new cLanguage();
     }
     // Parent constuctor
     parent::__construct();
     // Table object (news)
     if (!isset($GLOBALS["news"])) {
         $GLOBALS["news"] =& $this;
         $GLOBALS["Table"] =& $GLOBALS["news"];
     }
     $KeyUrl = "";
     if (@$_GET["news_id"] != "") {
         $this->RecKey["news_id"] = $_GET["news_id"];
         $KeyUrl .= "&news_id=" . urlencode($this->RecKey["news_id"]);
     }
     $this->ExportPrintUrl = $this->PageUrl() . "export=print" . $KeyUrl;
     $this->ExportHtmlUrl = $this->PageUrl() . "export=html" . $KeyUrl;
     $this->ExportExcelUrl = $this->PageUrl() . "export=excel" . $KeyUrl;
     $this->ExportWordUrl = $this->PageUrl() . "export=word" . $KeyUrl;
     $this->ExportXmlUrl = $this->PageUrl() . "export=xml" . $KeyUrl;
     $this->ExportCsvUrl = $this->PageUrl() . "export=csv" . $KeyUrl;
     $this->ExportPdfUrl = $this->PageUrl() . "export=pdf" . $KeyUrl;
     // Page ID
     if (!defined("EW_PAGE_ID")) {
         define("EW_PAGE_ID", 'view', TRUE);
     }
     // Table name (for backward compatibility)
     if (!defined("EW_TABLE_NAME")) {
         define("EW_TABLE_NAME", 'news', TRUE);
     }
     // Start timer
     if (!isset($GLOBALS["gTimer"])) {
         $GLOBALS["gTimer"] = new cTimer();
     }
     // Open connection
     if (!isset($conn)) {
         $conn = ew_Connect();
     }
     // Export options
     $this->ExportOptions = new cListOptions();
     $this->ExportOptions->Tag = "span";
     $this->ExportOptions->TagClassName = "ewExportOption";
     // Other options
     $this->OtherOptions['action'] = new cListOptions();
     $this->OtherOptions['action']->Tag = "span";
     $this->OtherOptions['action']->TagClassName = "ewActionOption";
     $this->OtherOptions['detail'] = new cListOptions();
     $this->OtherOptions['detail']->Tag = "span";
     $this->OtherOptions['detail']->TagClassName = "ewDetailOption";
 }
Example #3
0
 function __construct()
 {
     global $conn, $Language;
     $GLOBALS["Page"] =& $this;
     // Language object
     if (!isset($Language)) {
         $Language = new cLanguage();
     }
     // Parent constuctor
     parent::__construct();
     // Table object (news)
     if (!isset($GLOBALS["news"])) {
         $GLOBALS["news"] =& $this;
         $GLOBALS["Table"] =& $GLOBALS["news"];
     }
     // Page ID
     if (!defined("EW_PAGE_ID")) {
         define("EW_PAGE_ID", 'add', TRUE);
     }
     // Table name (for backward compatibility)
     if (!defined("EW_TABLE_NAME")) {
         define("EW_TABLE_NAME", 'news', TRUE);
     }
     // Start timer
     if (!isset($GLOBALS["gTimer"])) {
         $GLOBALS["gTimer"] = new cTimer();
     }
     // Open connection
     if (!isset($conn)) {
         $conn = ew_Connect();
     }
 }
Example #4
0
    <!-- Right Nav Section -->
    <ul class="right">
    	<li><a href><?php 
echo date('D') . ", " . date('d / m / Y');
?>
</a></li>
    	
      	<li class="has-dropdown">
        	<a href=''>
          		News
        	</a>
	        	<ul class="dropdown">
                <?php 
session_start();
include "modul/cnews.php";
$cnews = new cnews();
$cnews->connection_db("localhost", "fendi", "hello", "db_inject");
$query = $cnews->select_all_data('cat_news');
while ($data = mysql_fetch_array($query)) {
    echo "<li><a href=?page=cat_news&cat={$data['name_cat']}>{$data['name_cat']}</a></li>";
}
?>
            </ul>
      	</li>
      	<li class="active">
          <?php 
if (isset($_SESSION['username'])) {
    echo "<a href=?page=logout>Logout</a>";
} else {
    echo "<a href=?page=login>Login</a>";
}