Esempio n. 1
0
 public function readnews()
 {
     $db = new DB();
     $db->connectdb(DB_NAME, DB_USERNAME, DB_PASSWORD);
     $id = intval($_GET['id']);
     $query = $db->select_query(sprintf("SELECT * FROM web_news WHERE `id` = %d", $id));
     $item = $db->fetch($query);
     $title = str_replace(array('"', "'", '`'), '', $item['topic']);
     $this->fb_tag['title'] = $title;
     $headline = str_replace(array('"', "'", '`'), '', strip_tags($item['headline']));
     $this->fb_tag['description'] = $headline;
     $domain = $this->domain();
     $this->fb_tag['picture'] = $domain . '/icon/news_' . $item['post_date'] . '.jpg';
     $this->fb_tag['domain'] = $domain;
 }
Esempio n. 2
0
// }
// if (preg_match("/mainfile.php/i",$_SERVER['PHP_SELF'])) {
//     Header("Location: index.php");
//     die();
// }
$PHP_SELF = "index.php";
require_once "setconf.php";
require_once "includes/config.in.php";
require_once "includes/function.in.php";
require_once "includes/class.mysql.php";
require_once "includes/array.in.php";
require_once "includes/class.ban.php";
require_once "includes/class.calendar.php";
header('Content-Type:text/html; charset=' . ISO . '');
$db = new DB();
$db->connectdb(DB_NAME, DB_USERNAME, DB_PASSWORD);
// Make sure you're using correct paths here
$admin_user = empty($_SESSION['admin_user']) ? "" : $_SESSION['admin_user'];
$admin_pwd = empty($_SESSION['admin_pwd']) ? "" : $_SESSION['admin_pwd'];
$login_true = empty($_SESSION['login_true']) ? "" : $_SESSION['login_true'];
$pwd_login = empty($_SESSION['pwd_login']) ? "" : $_SESSION['pwd_login'];
$op = empty($_GET['op']) ? "" : $_GET['op'];
$action = empty($_GET['action']) ? "" : $_GET['action'];
$page = empty($_GET['page']) ? "" : $_GET['page'];
$category = empty($_GET['category']) ? "" : $_GET['category'];
$loop = empty($_POST['loop']) ? "" : $_POST['loop'];
$IPADDRESS = get_real_ip();
function GETMODULE($name, $file)
{
    global $MODPATH, $MODPATHFILE;
    $targetPath = WEB_PATH;