예제 #1
0
	protected function __construct(){
		$this->conf = conf::getIns();

		$this->connect($this->conf->host, $this->conf->user, $this->conf->pwd);
		$this->select_db($this->conf->db);
		$this->setChar($this->conf->char);
	}
예제 #2
0
파일: conf.php 프로젝트: rigidus/ea
 function parse($name, $section = false)
 {
     self::$section = $section;
     if (!isset(self::$conf[$name])) {
         if ($section) {
             self::$conf[$name][$section] = ini::parse(SYS_ROOT . 'conf/web/' . $name . '.ini', $section);
             foreach (self::$conf[$name][$section] as $k => $v) {
                 self::$conf[$name][$section][$k] = explode(',', $v);
             }
         } else {
             self::$conf[$name] = ini::parse(SYS_ROOT . 'conf/web/' . $name . '.ini');
             foreach (self::$conf[$name] as $k => $v) {
                 foreach ($v as $d => $f) {
                     self::$conf[$name][$k][$d] = explode(',', $f);
                 }
             }
         }
     }
     if ($section) {
         if (isset(self::$conf[$name][$section])) {
             return self::$conf[$name][$section];
         } else {
             return array();
         }
     } else {
         return self::$conf[$name];
     }
 }
예제 #3
0
	public static function getIns(){
		if(self::$ins instanceof self){
			return self::$ins;
		}else{
			return self::$ins = new self();
		}
	}
예제 #4
0
 public static function getIns()
 {
     if (self::$ins === null) {
         self::$ins = new self();
     }
     return self::$ins;
 }
예제 #5
0
 public static function getInstance()
 {
     if (!self::$_instance instanceof self) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
예제 #6
0
파일: services.php 프로젝트: laiello/xiv
 function send_mail($to, $subject, $message, $content_type = 'text/plain', $headers = null)
 {
     $conf =& $this->conf;
     if (!$content_type) {
         $content_type = 'text/plain';
     }
     if (is_array($headers)) {
         $text = array();
         foreach ($headers as $i => $v) {
             $text[] = "{$i}: " . preg_replace("/[\r\n].*?/", '', $v) . "\r\n";
         }
         $headers = implode('', $text);
     }
     // preventing possible spam attacks
     $to = trim(preg_replace("/[\r|\n](.*?)/", "", $to));
     $subject = trim(preg_replace("/[\r|\n](.*?)/", "", $subject));
     $message = trim(preg_replace("/[\r|\n]\\.[\r|\n](.*?)/", "", $message));
     if ($conf->get("core/smtp_enable")) {
         $smtp = new smtp_session(conf::get("core/smtp_host"), conf::get("core/smtp_port"), conf::get("core/smtp_user"), conf::get("core/smtp_pass"));
         if ($smtp->conn->status()) {
             $smtp->send($to, $subject, $message, $content_type, $headers);
         }
         $smtp->bye();
     } else {
         $headers = trim($headers) . "\r\n" . "" . "From: " . TM_HOST . " <" . $conf->get("core/email_address") . ">\r\n" . "X-From-Ip: " . IP_ADDR . "\r\n";
         mail($to, $subject, $message, trim($headers));
     }
 }
예제 #7
0
 protected function __construct()
 {
     //       require(ROOT.'include/configclass.php');
     $this->conf = conf::getIns();
     $this->connect($this->conf->host, $this->conf->user, $this->conf->pwd);
     $this->select_db($this->conf->db);
     $this->setChar($this->conf->char);
 }
예제 #8
0
 /**
  *
  * @param string $article string to filter.
  * @return 
  */
 public function filter($article)
 {
     self::init();
     if (conf::getMainIni('filters_allow_files')) {
         $article = self::filterPhpFile($article);
     }
     $article = self::filterPhpInline($article);
     return $article;
 }
예제 #9
0
 public static function Init()
 {
     $host = conf::getHostname();
     $dbname = conf::getDataBase();
     $login = conf::getLogin();
     $pass = conf::getPassword();
     try {
         self::$pdo = new PDO("mysql:host={$host};dbname={$dbname}", $login, $pass, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
     } catch (PDOException $e) {
         echo $e->getMessage();
         // affiche un message d'erreur
         die;
     }
 }
예제 #10
0
파일: mysql.class.php 프로젝트: kison30/new
 protected function __construct()
 {
     //把conf.class.php    $conf数组传过来给这个类的$conf  以实现单例模式
     //过程是最行先把config.inc.php 的$CFG数组传给conf.class.php 实现单例,然后再从conf.class.php 把数组传到mysql.class.php 类里$conf;过程
     //就是这样的.
     //实现单例模式传数组数据
     $this->conf = conf::getIns();
     //连接数据库
     $this->connect($this->conf->host, $this->conf->user, $this->conf->pwd);
     //选库
     $this->select_db($this->conf->db);
     //选择字符集
     $this->setChar($this->conf->char);
 }
예제 #11
0
 public static function Init()
 {
     $host = conf::getHostname();
     $dbname = conf::getDataBase();
     $login = conf::getLogin();
     $pass = conf::getPassword();
     try {
         self::$pdo = new PDO("mysql:host={$host};dbname={$dbname}", $login, $pass);
     } catch (PDOException $e) {
         echo $e->getMessage();
         // affiche un message d'erreur
         die;
     }
 }
예제 #12
0
 public static function Init()
 {
     $host = conf::getHostname();
     $dbname = conf::getDatabase();
     $login = conf::getLogin();
     $pass = conf::getPassword();
     try {
         self::$pdo = new PDO("mysql:host={$host};dbname={$dbname}", $login, $pass, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
         // On active le mode d'affichage des erreurs, et le lancement d'exception en cas d'erreur
         self::$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
     } catch (PDOException $e) {
         echo $e->getMessage();
         die;
     }
 }
예제 #13
0
파일: mysql.php 프로젝트: nowdence/test
 public static function getIns()
 {
     if (self::$ins === null) {
         self::$ins = new self();
     }
     $conf = conf::getIns();
     self::$ins->host = $conf->host;
     self::$ins->user = $conf->user;
     self::$ins->passwd = $conf->pwd;
     self::$ins->db = $conf->db;
     self::$ins->port = $conf->port;
     self::$ins->connect();
     self::$ins->select_db();
     self::$ins->setChar();
     return self::$ins;
 }
예제 #14
0
파일: Category.php 프로젝트: xpac27/Opipop
 private function getArchiveFilter($value)
 {
     return array('name' => 'q.date', 'operator' => $value ? '<' : '>', 'value' => time() - time() % conf::get('MEMCACHED_DURATION') - Conf::get('QUESTION_DURATION'));
 }
예제 #15
0
<?php 
ob_start();
require_once 'connect.php';
require_once 'include/module/index.class.php';
require_once 'include/module/conf.class.php';
require_once 'include/module/user.class.php';
require_once 'include/module/upload.func.php';
require_once 'include/module/simpleimage.class.php';
require_once 'include/module/Content.class.php';
require_once 'include/module/dett.php';
$conf = new conf();
$conf->query(mysqli_query($db, "SELECT * FROM `" . TB_CONF . "` WHERE `id`='1'"));
$user = new user($db);
$user->sessionName('login', 'password');
$obj = new glowna($db);
$theme = $conf->pobierz("theme");
$lang = 'lt';
$contentFileName = 'themes/' . $theme . '/content_' . $lang . '.ini';
$content = new Content($contentFileName, $lang);
if (isset($_POST['submit_tresc'])) {
    if (($error = $obj->genericValidation($_POST)) != 0) {
        switch ($error) {
            case 1:
                echo '<b>' . $content->getValue("dodaj", "niewypelniono") . '</b><br/><a href="dodaj.php">&laquo; ' . $content->getValue("global", "powrot") . '</a>';
                exit;
                break;
        }
    }
    $tresc = @htmlspecialchars(mysqli_real_escape_string($db, $_POST['tresc']));
    $tytul = @htmlspecialchars(mysqli_real_escape_string($db, $_POST['tytul']));
예제 #16
0
function armar_banner_old($id_zona = 0, $sec_id = 0, $reg_id = 0, $hzo_id = 0)
{
    include_once conf::getInc() . "/campanias.inc.php";
    $oCampania = new campanias();
    $banner = $oCampania->listarBannersHome($id_zona, $sec_id, $reg_id, $hzo_id);
    if ($campania["cam_id"]) {
        /*INCREMENTO LA LAS IMPRESIONES DE LA CAMPANIA*/
        $oCampania->updImpresiones($campania["cam_id"]);
        /*ACTUALIZA LA TABLA DE ESTADISTICAS*/
        $oCampania->updEstadisticas($campania["cam_id"], 1, getIP());
        $html = "";
        $file = "../data/img_cont/img_banners/" . $campania["cam_archivo"];
        $img = explode(".", $campania["cam_archivo"]);
        $target = $campania["cam_target"] == "p" ? "_parent" : "_blank";
        if (is_file($file)) {
            $datosFile = getimagesize($file);
            switch ($img[1]) {
                case "swf":
                    /*FLASH*/
                    $html .= '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' . $datosFile[0] . 'px" height="' . $datosFile[1] . 'px" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">
                                	<param name="movie" value="../global/swf/cont_banner.swf"/>
                                	<param name="scale" value="noscale"/>
                                	<param name="salign" value="lt"/>
                                	<param name="quality" value="high"/>
                                    <param name="bgcolor" value="#ffffff">
                                    <param name="FlashVars" value="url=' . $campania['cam_url_link'] . '&camp=' . $campania['cam_id'] . '&ban=' . $campania['cam_id'] . '&targ=' . $target . '"/>
                                	<param name="allowScriptAccess" value="sameDomain"/>
                                	<param name="menu" value="false"/>
                                    <embed src="../global/swf/cont_banner.swf" bgcolor="#ffffff" quality="high" scale="noscale" salign="lt" menu="false" width="' . $datosFile[0] . 'px" height="' . $datosFile[1] . 'px" align="middle" quality="high" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="url=' . $campania['cam_url_link'] . '&camp=' . $campania['cam_id'] . '&ban=' . $campania['cam_id'] . '&targ=' . $target . '"/>
                                </object>';
                    break;
                default:
                    /*OTRO...*/
                    if ($campania['cam_url_link']) {
                        $add_href = "<a href='../home/cont_click.php?url=" . $campania['cam_url_link'] . "&idcamp=" . $campania['cam_id'] . "' target='{$target}'>";
                    }
                    $html .= $add_href . ' 
                            <img src="' . $file . '" width="' . $datosFile[0] . '" height="' . $datosFile[1] . '" alt=""></a>';
                    break;
            }
            // switch
        }
    }
    return $html;
}
예제 #17
0
/*
 1 : OK
 2 : Waiting for validation
 3 : blacklisted by operator
 10 : GMAP did not succeed to find a location
 11 : if the place the info is mapped to has been blacklisted by the operator
 12 : Location found is not in the feed zone
 13 : info not geolocalized and refused by parser defaultPrintFlag (= 3 )
*/
/*FEED DEFAULT PRINT FLAG*/
// "defaultPrintFlag" => 0, if not geolocalized, we localize at the default location but we don't print on the map ( only in the text feed )
// "defaultPrintFlag" => 1,// if not geolocalized, we localize at the default location and we print on the map
// "defaultPrintFlag" => 2,// do not perform a geoloc and locate on the default location of the feed
// "defaultPrintFlag" => 3, if not geolocalized, we don't take the info -> stored in status 13
require_once "../LIB/conf.php";
$conf = new conf();
$m = new Mongo();
$db = $conf->mdb();
$infoColl = $db->info;
$placeColl = $db->place;
$yakcatColl = $db->yakcat;
$yakNEColl = $db->yakNE;
$tagColl = $db->tag;
$batchlogColl = $db->batchlog;
$statColl = $db->stat;
$feedColl = $db->feed;
$logCallToGMap = 0;
$logInfoInserted = 0;
$logPlaceInserted = 0;
$logInfoAlreadyInDB = 0;
$logPlaceAlreadyInDB = 0;
예제 #18
0
 /**
  * defines all common constants after loading main ini file. 
  * 
  */
 public static function defineCommon()
 {
     $htdocs_path = conf::pathBase() . "/htdocs";
     if (file_exists($htdocs_path)) {
         conf::setMainIni('htdocs_path', self::pathBase() . '/htdocs');
     } else {
         conf::setMainIni('htdocs_path', self::pathBase());
     }
     // module dir
     $mod_dir = self::getMainIni('module_dir');
     if (!$mod_dir) {
         $mod_dir = 'modules';
     }
     self::setMainIni('modules_dir', $mod_dir);
     // module path
     self::setMainIni('modules_path', self::pathBase() . "/" . $mod_dir);
     // files dir
     self::setMainIni('files_dir', 'files');
 }
예제 #19
0
파일: map.module.php 프로젝트: rigidus/ea
 function handlers()
 {
     $ini = conf::parse('pages');
     foreach ($ini as $k => $v) {
         $methods = $v['methods'];
         if (empty($methods[0])) {
             continue;
         }
         foreach ($methods as $f) {
             s::roll('page_handlers' . $k, array('handler' => $f));
         }
         $page = appPages::getPage($k);
         s::roll('handlers', array('page_title' => $page['page_title'], 'page_id' => $k, 'page_folder' => appPages::getUrl($page['page_folder'])));
     }
 }
예제 #20
0
파일: main.module.php 프로젝트: rigidus/ea
 function deleteMethod()
 {
     conf::deleteMethod('tmpls', params::get('tmpl_id'), params::get('app'), params::get('module'), params::get('action'));
 }
예제 #21
0
<?php 
ini_set('max_execution_time', 0);
set_time_limit(0);
ini_set('display_errors', 1);
require_once "../LIB/library.php";
require_once "../LIB/conf.php";
$conf = new conf();
$m = new Mongo();
$db = $m->selectDB($conf->db());
$place = $db->place;
$records = array();
/*PARIS*/
/*
 */
$records[] = array("_id" => new MongoId("51b6c8ddfa9a95fc0c000000"), "title" => "Frigos", "content" => "", "thumb" => "", "origin" => "operator", "access" => 1, "licence" => "Yakwala", "outGoingLink" => "http://les-frigos.com/", "yakCat" => array(new MongoId("504d89f4fa9a958808000001"), new MongoId("5056b7aafa9a95180b000000"), new MOngoId('50923b9afa9a95d409000000')), "creationDate" => new MongoDate(gmmktime()), "lastModifDate" => new MongoDate(gmmktime()), "location" => array('lat' => 48.83115, 'lng' => 2.378944), "formatted_address" => "19 Rue des Frigos, 75013 Paris, France", "address" => array('street_number' => '19', 'street' => "rue de Frigos", 'arr' => '', 'city' => 'Paris', 'state' => 'Paris', 'area' => 'Paris', 'country' => 'France', 'zip' => '75013'), "status" => 1, "user" => 0, "zone" => 1);
$records[] = array("_id" => new MongoId("51a3019ffa9a954409000003"), "title" => "Hénin-Beaumont", "content" => "", "thumb" => "", "origin" => "operator", "access" => 1, "licence" => "Yakwala", "outGoingLink" => "", "yakCat" => array(new MongoId("504d89f4fa9a958808000001"), new MongoId("5056b7aafa9a95180b000000")), "creationDate" => new MongoDate(gmmktime()), "lastModifDate" => new MongoDate(gmmktime()), "location" => array('lat' => 50.420331, 'lng' => 2.947716), "formatted_address" => "Hénin-Beaumont, 62110 France", "address" => array('street_number' => '', 'street' => "", 'arr' => '', 'city' => 'Hénin-Beaumont', 'state' => 'Pas-de-Calais', 'area' => 'Nord-Pas-de-Calais', 'country' => 'France', 'zip' => '62110'), "status" => 1, "user" => 0, "zone" => 1);
$records[] = array("_id" => new MongoId("51a2fa2dfa9a954409000000"), "title" => "Roland-Garros", "content" => "", "thumb" => "", "origin" => "operator", "access" => 1, "licence" => "Yakwala", "outGoingLink" => "http://www.rolandgarros.com/index.html", "yakCat" => array(new MongoId("504d89f4fa9a958808000001"), new MongoId("5056b7aafa9a95180b000000")), "creationDate" => new MongoDate(gmmktime()), "lastModifDate" => new MongoDate(gmmktime()), "location" => array('lat' => 48.847406, 'lng' => 2.250992), "formatted_address" => "2 Avenue Gordon Bennett, 75016 Paris France", "address" => array('street_number' => '2', 'street' => "Avenue Gordon Bennett", 'arr' => '16e', 'city' => 'Paris', 'state' => 'Paris', 'area' => 'Ile-de-France', 'country' => 'France', 'zip' => '75016'), "contact" => array('tel' => '', 'transportation' => "Métro Porte d'Autueil", 'web' => 'http://www.rolandgarros.com/fr_FR/index.html', 'opening' => '', 'closing' => '', 'specialopening' => ''), "status" => 1, "user" => 0, "zone" => 1);
$records[] = array("_id" => new MongoId("519c9115fa9a957c09000000"), "title" => "la Pinacothèque", "content" => "", "thumb" => "", "origin" => "operator", "access" => 1, "licence" => "Yakwala", "outGoingLink" => "http://www.pinacotheque.com/", "yakCat" => array(new MongoId("504d89f4fa9a958808000001"), new MongoId("5056b7aafa9a95180b000000")), "creationDate" => new MongoDate(gmmktime()), "lastModifDate" => new MongoDate(gmmktime()), "location" => array('lat' => 48.870707, 'lng' => 2.325829), "formatted_address" => "28 Place de la Madeleine, Paris, France", "address" => array('street_number' => '28', 'street' => "Place de la Madeleine", 'arr' => '8e', 'city' => 'Paris', 'state' => 'Paris', 'area' => 'Ile-de-France', 'country' => 'France', 'zip' => '75008'), "contact" => array('tel' => '01 42 68 02 01', 'transportation' => 'Métro Monceau', 'web' => 'http://www.ateliersdart.com', 'opening' => 'Tlj 10:30 – 17:45', 'closing' => 'Le 1er mai, le 14 juillet, le 25 décembre et le 1er janvier, Ouverture de 14h à 18h30', 'specialopening' => 'Tous les mercredis et les vendredis jusqu’à 21h'), "status" => 1, "user" => 0, "zone" => 1);
$records[] = array("_id" => new MongoId("519b14f2fa9a95340b000000"), "title" => "prison de la Santé", "content" => "La maison d’arrêt de la Santé, ou plus simplement la prison de la Santé ou la Santé, est une prison située dans l’est du quartier du Montparnasse du 14e arrondissement de Paris, au 42, rue de la Santé.", "thumb" => "", "origin" => "operator", "access" => 1, "licence" => "Yakwala", "outGoingLink" => "http://fr.wikipedia.org/wiki/Prison_de_la_Sant%C3%A9", "yakCat" => array(new MongoId("504d89f4fa9a958808000001"), new MongoId("5056b7aafa9a95180b000000")), "creationDate" => new MongoDate(gmmktime()), "lastModifDate" => new MongoDate(gmmktime()), "location" => array('lat' => 48.83399, 'lng' => 2.341354), "formatted_address" => "42 rue de la Santé, Paris, France", "address" => array('street_number' => '42', 'street' => "Rue de la Santé", 'arr' => '14e', 'city' => 'Paris', 'state' => 'Paris', 'area' => 'Ile-de-France', 'country' => 'France', 'zip' => '75014'), "status" => 1, "user" => 0, "zone" => 1);
$records[] = array("_id" => new MongoId("5199c7f4fa9a95480c000000"), "title" => "La Défense", "content" => "", "thumb" => "", "origin" => "operator", "access" => 1, "licence" => "Yakwala", "outGoingLink" => "", "yakCat" => array(new MongoId("504d89f4fa9a958808000001"), new MongoId("5056b7aafa9a95180b000000")), "creationDate" => new MongoDate(gmmktime()), "lastModifDate" => new MongoDate(gmmktime()), "location" => array('lat' => 48.890815, 'lng' => 2.240911), "formatted_address" => "Place de la Défense, Paris, France", "address" => array('street_number' => '', 'street' => "", 'arr' => '', 'city' => 'La Défense', 'state' => 'Paris', 'area' => 'Ile-de-France', 'country' => 'France', 'zip' => '92000'), "status" => 1, "user" => 0, "zone" => 1);
$records[] = array("_id" => new MongoId("5199c7f4fa9a95480c000001"), "title" => "au Trocadéro", "content" => "", "thumb" => "", "origin" => "operator", "access" => 1, "licence" => "Yakwala", "outGoingLink" => "", "yakCat" => array(new MongoId("504d89f4fa9a958808000001"), new MongoId("5056b7aafa9a95180b000000")), "creationDate" => new MongoDate(gmmktime()), "lastModifDate" => new MongoDate(gmmktime()), "location" => array('lat' => 48.86288, 'lng' => 2.287216), "formatted_address" => "Place du Trocadéro, Paris, France", "address" => array('street_number' => '', 'street' => "", 'arr' => '16e', 'city' => 'Paris', 'state' => 'Paris', 'area' => 'Ile-de-France', 'country' => 'France', 'zip' => '75016'), "status" => 1, "user" => 0, "zone" => 1);
$records[] = array("_id" => new MongoId("5199c7f4fa9a95480c000002"), "title" => "autour du Trocadéro", "content" => "", "thumb" => "", "origin" => "operator", "access" => 1, "licence" => "Yakwala", "outGoingLink" => "", "yakCat" => array(new MongoId("504d89f4fa9a958808000001"), new MongoId("5056b7aafa9a95180b000000")), "creationDate" => new MongoDate(gmmktime()), "lastModifDate" => new MongoDate(gmmktime()), "location" => array('lat' => 48.86288, 'lng' => 2.287216), "formatted_address" => "Place du Trocadéro, Paris, France", "address" => array('street_number' => '', 'street' => "", 'arr' => '16e', 'city' => 'Paris', 'state' => 'Paris', 'area' => 'Ile-de-France', 'country' => 'France', 'zip' => '75016'), "status" => 1, "user" => 0, "zone" => 1);
$records[] = array("_id" => new MongoId("5199c7f4fa9a95480c000003"), "title" => "au Troca", "content" => "", "thumb" => "", "origin" => "operator", "access" => 1, "licence" => "Yakwala", "outGoingLink" => "", "yakCat" => array(new MongoId("504d89f4fa9a958808000001"), new MongoId("5056b7aafa9a95180b000000")), "creationDate" => new MongoDate(gmmktime()), "lastModifDate" => new MongoDate(gmmktime()), "location" => array('lat' => 48.86288, 'lng' => 2.287216), "formatted_address" => "Place du Trocadéro, Paris, France", "address" => array('street_number' => '', 'street' => "", 'arr' => '16e', 'city' => 'Paris', 'state' => 'Paris', 'area' => 'Ile-de-France', 'country' => 'France', 'zip' => '75016'), "status" => 1, "user" => 0, "zone" => 1);
$records[] = array("_id" => new MongoId("5199c7f4fa9a95480c000004"), "title" => "autour du Troca", "content" => "", "thumb" => "", "origin" => "operator", "access" => 1, "licence" => "Yakwala", "outGoingLink" => "", "yakCat" => array(new MongoId("504d89f4fa9a958808000001"), new MongoId("5056b7aafa9a95180b000000")), "creationDate" => new MongoDate(gmmktime()), "lastModifDate" => new MongoDate(gmmktime()), "location" => array('lat' => 48.86288, 'lng' => 2.287216), "formatted_address" => "Place du Trocadéro, Paris, France", "address" => array('street_number' => '', 'street' => "", 'arr' => '16e', 'city' => 'Paris', 'state' => 'Paris', 'area' => 'Ile-de-France', 'country' => 'France', 'zip' => '75016'), "status" => 1, "user" => 0, "zone" => 1);
$records[] = array("_id" => new MongoId("5188b926fa9a95380b00005d"), "title" => "de Bastille à République", "content" => "", "thumb" => "", "origin" => "operator", "access" => 1, "licence" => "Yakwala", "outGoingLink" => "", "yakCat" => array(new MongoId("504d89f4fa9a958808000001"), new MongoId("5056b7aafa9a95180b000000")), "creationDate" => new MongoDate(gmmktime()), "lastModifDate" => new MongoDate(gmmktime()), "location" => array('lat' => 48.853195, 'lng' => 2.368927), "formatted_address" => "Bastille-République, Paris, France", "address" => array('street_number' => '', 'street' => "", 'arr' => '', 'city' => 'Paris', 'state' => 'Paris', 'area' => 'Ile-de-France', 'country' => 'France', 'zip' => '75004'), "status" => 1, "user" => 0, "zone" => 1);
$records[] = array("_id" => new MongoId("5163b128fa9a95240b000021"), "title" => "Musée du Cinéma", "content" => "Longtemps installée au palais de Chaillot, la Cinémathèque française occupe depuis septembre 2005 un bâtiment moderne construit par l’architecte Frank Gehry, 51 rue de Bercy (Paris 12e), au coeur d’un quartier de Paris en plein développement.", "thumb" => "", "origin" => "operator", "access" => 1, "licence" => "Yakwala", "outGoingLink" => "http://www.cinematheque.fr/", "yakCat" => array(new MongoId("504d89f4fa9a958808000001"), new MongoId("5056b7aafa9a95180b000000")), "freeTag" => array("Culture", "Cinéma"), "creationDate" => new MongoDate(gmmktime()), "lastModifDate" => new MongoDate(gmmktime()), "location" => array('lat' => 48.837316, 'lng' => 2.382563), "formatted_address" => "51 Rue de Bercy, 75012 Paris, France", "address" => array('street_number' => '51', 'street' => "Rue de Bercy", 'arr' => '12', 'city' => 'Paris', 'state' => 'Paris', 'area' => 'Ile-de-France', 'country' => 'France', 'zip' => '75012'), "contact" => array('web' => 'http://www.cinematheque.fr/', 'tel' => '01 71 19 33 33'), "status" => 1, "user" => 0, "zone" => 1);
$records[] = array("_id" => new MongoId("5163b128fa9a95240b000022"), "title" => "Cinémathèque française", "content" => "Longtemps installée au palais de Chaillot, la Cinémathèque française occupe depuis septembre 2005 un bâtiment moderne construit par l’architecte Frank Gehry, 51 rue de Bercy (Paris 12e), au coeur d’un quartier de Paris en plein développement.", "thumb" => "", "origin" => "operator", "access" => 1, "licence" => "Yakwala", "outGoingLink" => "http://www.cinematheque.fr/", "yakCat" => array(new MongoId("504d89f4fa9a958808000001"), new MongoId("5056b7aafa9a95180b000000")), "freeTag" => array("Culture", "Cinéma"), "creationDate" => new MongoDate(gmmktime()), "lastModifDate" => new MongoDate(gmmktime()), "location" => array('lat' => 48.837316, 'lng' => 2.382563), "formatted_address" => "51 Rue de Bercy, 75012 Paris, France", "address" => array('street_number' => '51', 'street' => "Rue de Bercy", 'arr' => '12', 'city' => 'Paris', 'state' => 'Paris', 'area' => 'Ile-de-France', 'country' => 'France', 'zip' => '75012'), "contact" => array('web' => 'http://www.cinematheque.fr/', 'tel' => '01 71 19 33 33'), "status" => 1, "user" => 0, "zone" => 1);
$records[] = array("_id" => new MongoId("512da6edfa9a95480c00006a"), "title" => "la Madeleine", "content" => "Eglise de la Madelaine: Sa construction s'est étalée sur 85 ans en raison des troubles politiques en France à la fin du xviiie siècle, et au début du xixe siècle. Les changements politiques de l'époque en firent modifier à plusieurs reprises la destination et les plans. Conçu par Napoléon Ier comme un temple maçonnique (cf. temple de la raison) dédié à la gloire de sa Grande Armée en 1806, le bâtiment faillit être transformé en 1837 en gare ferroviaire, la première de Paris, avant de devenir une église en 1845. Sous le fronton, l'inscription en latin « D.O.M. SVB. INVOCAT S. MAR. MAGDALENÆ » signifie « Au Dieu tout puissant et très grand, sous l'invocation de sainte Marie-Madeleine ». L'édifice a une longueur de 108 mètres, une largeur de 43 mètres, une hauteur de 30 mètres et est ceinturé par 52 colonnes corinthiennes.", "thumb" => "", "origin" => "operator", "access" => 1, "licence" => "Yakwala", "outGoingLink" => "http://www.lebuspalladium.com", "yakCat" => array(new MongoId("504d89f4fa9a958808000001"), new MongoId("5056b7aafa9a95180b000000")), "creationDate" => new MongoDate(gmmktime()), "lastModifDate" => new MongoDate(gmmktime()), "location" => array('lat' => 48.869867, 'lng' => 2.324209), "formatted_address" => "Place de la Madeleine, 75008 Paris, France", "address" => array('street_number' => '', 'street' => "Place de la Madeleine", 'arr' => '8', 'city' => 'Paris', 'state' => 'Paris', 'area' => 'Ile-de-France', 'country' => 'France', 'zip' => '75008'), "contact" => array('web' => 'http://eglise-lamadeleine.com‎', 'tel' => '01 44 51 69 00'), "status" => 1, "user" => 0, "zone" => 1);
$records[] = array("_id" => new MongoId("50f6659cfa9a95000d0000ca"), "title" => "Bus Palladium", "content" => "C’est James Arch qui créa le Bus Palladium dans les années 60.", "thumb" => "", "origin" => "operator", "access" => 1, "licence" => "Yakwala", "outGoingLink" => "http://www.lebuspalladium.com", "yakCat" => array(new MongoId("504d89f4fa9a958808000001"), new MongoId("5056b7aafa9a95180b000000"), new MongoId("506479f54a53042191010000")), "creationDate" => new MongoDate(gmmktime()), "lastModifDate" => new MongoDate(gmmktime()), "location" => array('lat' => 48.880776, 'lng' => 2.33487), "formatted_address" => "6 Rue Pierre Fontaine, 75009 Paris", "address" => array('street_number' => '6', 'street' => "Rue Pierre Fontaine", 'arr' => '9', 'city' => 'Paris', 'state' => 'Paris', 'area' => 'Ile-de-France', 'country' => 'France', 'zip' => '75009'), "status" => 1, "user" => 0, "zone" => 1);
$records[] = array("_id" => new MongoId("50f3ccbefa9a95f809000000"), "title" => "siège du Parti communiste", "content" => "", "thumb" => "", "origin" => "operator", "access" => 1, "licence" => "Yakwala", "outGoingLink" => "", "yakCat" => array(new MongoId("504d89f4fa9a958808000001"), new MongoId("5056b7aafa9a95180b000000")), "creationDate" => new MongoDate(gmmktime()), "lastModifDate" => new MongoDate(gmmktime()), "location" => array('lat' => 48.877869, 'lng' => 2.370723), "formatted_address" => "2 Place du Colonel Fabien, 75019 Paris", "address" => array('street_number' => '2', 'street' => "Place du Colonel Fabien", 'arr' => '19', 'city' => 'Paris', 'state' => 'Paris', 'area' => 'Ile-de-France', 'country' => 'France', 'zip' => '75019'), "status" => 1, "user" => 0, "zone" => 1);
$records[] = array("_id" => new MongoId("50f3c0bdfa9a95440b00000e"), "title" => "Sacré-Cœur", "content" => "", "thumb" => "", "origin" => "operator", "access" => 1, "licence" => "Yakwala", "outGoingLink" => "", "yakCat" => array(new MongoId("504d89f4fa9a958808000001"), new MongoId("5056b7aafa9a95180b000000")), "creationDate" => new MongoDate(gmmktime()), "lastModifDate" => new MongoDate(gmmktime()), "location" => array('lat' => 48.886688, 'lng' => 2.343047), "formatted_address" => "75004 Paris", "address" => array('street_number' => '', 'street' => "", 'arr' => '4', 'city' => 'Paris', 'state' => 'Paris', 'area' => 'Ile-de-France', 'country' => 'France', 'zip' => '75004'), "status" => 1, "user" => 0, "zone" => 1);
예제 #22
0
파일: conf.php 프로젝트: stripTM/acd
conf::$DATA_PATH = '/mnt/contenido/acd/structures.json';
conf::$DATA_DIR_PATH = '/mnt/contenido/acd/structures';
conf::$DATA_CONTENT_PATH = '/mnt/contenido/acd/contents';
conf::$STORAGE_TYPE_TEXTPLAIN = 'text/plain';
conf::$STORAGE_TYPE_MONGODB = 'mongodb';
conf::$STORAGE_TYPE_MYSQL = 'mysql';
conf::$STORAGE_TYPES = [conf::$STORAGE_TYPE_TEXTPLAIN => ['name' => 'text/plain', 'disabled' => true], conf::$STORAGE_TYPE_MONGODB => ['name' => 'Mongo DB', 'disabled' => false], conf::$STORAGE_TYPE_MYSQL => ['name' => 'MySql', 'disabled' => true]];
conf::$DEFAULT_STORAGE = conf::$STORAGE_TYPE_MONGODB;
conf::$PERMISSION_PATH = '/mnt/contenido/acd/permission.json';
conf::$USE_AUTHENTICATION = true;
conf::$AUTH_PERSITENT_EXPIRATION_TIME = 31536000;
// 1 year
conf::$PATH_AUTH_CREDENTIALS_FILE = '/mnt/contenido/acd/auth.json';
conf::$PATH_AUTH_PREMANENT_LOGIN_DIR = '/mnt/contenido/acd/auth_permanent_login';
conf::$ROL_DEVELOPER = 'developer';
conf::$ROL_EDITOR = 'editor';
conf::$MYSQL_SERVER = 'localhost';
conf::$MYSQL_USER = '******';
conf::$MYSQL_PASSWORD = '******';
conf::$MYSQL_SCHEMA = 'acd';
conf::$MONGODB_SERVER = 'mongodb://plusdbspol01.prisadigital.int:27017,plusdbspol02.prisadigital.int:27017,plusdbspol03.prisadigital.int:27017/?replicaSet=ReplicaPlusProduccion';
// Developer / local / personal  configuration
// Default  environment  for develop is 'local', in production environment  conf.devel.php does not exist
$environment = getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'local';
if (file_exists(DIR_BASE . '/conf.' . $environment . '.php')) {
    require DIR_BASE . '/conf.' . $environment . '.php';
}
/* Debug */
if (file_exists(DIR_BASE . '/../tools/kint/Kint.class.php')) {
    require DIR_BASE . '/../tools/kint/Kint.class.php';
}
예제 #23
0
<?php

//Tue, 30 Oct 2012 10:40:12 +0100
/* batch to parse twitter feeds and generate a rss feed
 * */
include_once "../LIB/conf.php";
$conf = new conf();
ini_set('display_errors', 1);
$res = '';
if (!empty($_GET['screen_name'])) {
    /** Set access tokens here - see: https://dev.twitter.com/apps/ **/
    $settings = $conf->conf_secret()->twitterAPIKey();
    /** URL for REST request, see: https://dev.twitter.com/docs/api/1.1/ **/
    $url = 'https://api.twitter.com/1.1/blocks/create.json';
    /** Perform a GET request and echo the response **/
    /** Note: Set the GET field BEFORE calling buildOauth(); **/
    $url = 'https://api.twitter.com/1.1/statuses/user_timeline.json';
    $getfield = '?screen_name=' . $_GET['screen_name'];
    $requestMethod = 'GET';
    $twitter = new TwitterAPIExchange($settings);
    echo $twitter->setGetfield($getfield)->buildOauth($url, $requestMethod)->performRequest();
} else {
    echo "use : ?screen_name=Paris";
}
echo $res;
?>


예제 #24
0
<?php

session_start();
include dirname(dirname(dirname(__FILE__))) . "/functions/inc/util.inc.php";
include dirname(dirname(dirname(__FILE__))) . "/functions/inc/mydb.inc.php";
include dirname(dirname(dirname(__FILE__))) . "/functions/inc/seguridad.php";
include dirname(dirname(dirname(__FILE__))) . "/functions/conf/conf.php";
$conf = new conf();
$db = new mydb();
$db->rawData("SET NAMES 'utf8'");
$formatos_img = array('image/jpeg', 'image/pjpeg', 'image/png', 'image/jpg');
if (trim($_POST["nombre"]) != "" && trim($_POST["descripcion"]) != "" && $_POST["categoria"] != 0) {
    $img_del = "";
    if ($_POST["elim_img"] == 1) {
        $img_del = ",prod_foto='' ";
        $rs = $db->consulta("SELECT * FROM producto WHERE prod_id=" . $_POST["id"]);
        if (file_exists(dirname(dirname(dirname(__FILE__))) . "/img/producto/" . $rs[0]["prod_foto"])) {
            unlink(dirname(dirname(dirname(__FILE__))) . "/img/producto/" . $rs[0]["prod_foto"]);
        }
    }
    $db->rawData("UPDATE producto SET prod_nombre='" . addslashes($_POST["nombre"]) . "'," . "prod_descripcion='" . addslashes($_POST["descripcion"]) . "'," . "catp_id=" . $_POST["categoria"] . "," . "prod_destacado=" . $_POST["destacada"] . ",prod_keywords='" . addslashes($_POST["palabras_clave"]) . "'" . ",prod_publicado=" . addslashes($_POST["publicada"]) . " " . $img_del . " " . "WHERE prod_id=" . $_POST["id"]);
    if ($_FILES["imagen"]["size"] > max_upload_file_size()) {
        header("Location:../index.php?acc=" . $_POST["acc"] . "&msg=5");
        die;
    }
    if ($_FILES["imagen"]["name"] != "" && in_array($_FILES["imagen"]["type"], $formatos_img)) {
        $ext = obtenerExtension($_FILES["imagen"]["name"]);
        move_uploaded_file($_FILES["imagen"]["tmp_name"], $conf->getRoot() . "/img/producto/" . $_POST["id"] . "." . $ext);
        $db->rawData("UPDATE producto SET prod_foto='" . $_POST["id"] . "." . $ext . "' WHERE prod_id=" . $_POST["id"]);
    } else {
        if ($_FILES["imagen"]["name"] != "") {
예제 #25
0
<?php

include 'chemin.inc.php';
$countries = conf::get('COUNTRIES');
$languages = conf::get('LANGUAGES');
$modeles = conf::get('MODELES');
$date_achat_jours = array();
for ($i = 1; $i <= 31; $i++) {
    $date_achat_jours[$i] = str_pad($i, 2, '0', STR_PAD_LEFT);
}
$date_achat_mois = array();
for ($i = 1; $i <= 12; $i++) {
    $date_achat_mois[$i] = ucfirst(page::trad('MOIS', $i));
}
$date_achat_annees = array();
for ($i = intval(date('Y')); $i >= 1950; $i--) {
    $date_achat_annees[$i] = str_pad($i, 2, '0', STR_PAD_LEFT);
}
$step = 'home';
if ($isCountrySel && $isLanguageSel) {
    $step = 'coordonnees';
}
$sports = page::trad('SPORTS');
$style_musical = page::trad('STYLE_MUSICAL');
$artistes = page::trad('ARTISTES');
$passions = page::trad('PASSIONS');
$tab_labels = array('country' => 'Please choose your country', 'language' => 'Select your language', 'nom' => page::trad('COORDONNEES', 'label_nom'), 'prenom' => page::trad('COORDONNEES', 'label_prenom'), 'num_tridente' => page::trad('COORDONNEES', 'label_num_tridente'), 'email' => page::trad('COORDONNEES', 'label_email'), 'modele' => page::trad('INFORMATIONS', 'label_modele'), 'immat' => page::trad('INFORMATIONS', 'label_immat'), 'date_achat_jour' => page::trad('INFORMATIONS', 'label_date_achat_jour'), 'date_achat_mois' => page::trad('INFORMATIONS', 'label_date_achat_mois'), 'date_achat_annee' => page::trad('INFORMATIONS', 'label_date_achat_annee'), 'sport' => page::trad('INFORMATIONS', 'label_sport'), 'style_musical' => page::trad('INFORMATIONS', 'label_style_musical'), 'artiste' => page::trad('INFORMATIONS', 'label_artiste'), 'autre' => page::trad('INFORMATIONS', 'label_autre'), 'adresse1' => page::trad('INFORMATIONS', 'label_adresse1'), 'adresse2' => page::trad('INFORMATIONS', 'label_adresse2'), 'code_postal' => page::trad('INFORMATIONS', 'label_code_postal'), 'ville' => page::trad('INFORMATIONS', 'label_ville'), 'telephone' => page::trad('INFORMATIONS', 'label_telephone'));
//
$oui_non = array('oui' => page::trad('INFORMATIONS', 'label_oui'), 'non' => page::trad('INFORMATIONS', 'label_non'));
$field = array('country' => 'select', 'language' => 'select', 'nom' => 'text', 'prenom' => 'text', 'num_tridente' => 'text', 'email' => 'text', 'modele' => 'select', 'immat' => 'text', 'date_achat_jour' => 'select', 'date_achat_mois' => 'select', 'date_achat_annee' => 'select', 'sport' => 'select', 'style_musical' => 'select', 'artiste' => 'text', 'autre' => 'text', 'passion' => 'radio', 'adresse1' => 'test', 'adresse2' => 'test', 'code_postal' => 'test', 'ville' => 'test', 'telephone' => 'test', 'optin' => 'radio', 'optin_sms' => 'radio', 'optin_courrier' => 'radio');
$tab_erreur = array();
예제 #26
0
파일: db.php 프로젝트: seph89/AmmProject
 public function query($query)
 {
     // Esegue le interrogazioni al DB
     $this->result = @mysql_query($query) or conf::showerror();
     return $this->result;
 }
예제 #27
0
<?php

ob_start();
require_once '../connect.php';
require_once '../include/module/admin/conf.class.php';
require_once '../include/module/admin/user.class.php';
require_once '../include/module/admin/poczekalnia.class.php';
//Nazwa strony
$title = 'Poczekalnia';
$conf = new conf();
$conf->query(mysqli_query($db, "SELECT * FROM `conf` WHERE `id`='1'"));
$obj = new poczekalnia($db);
$user = new user($db);
$user->sessionName('login', 'password');
if ($user->verifyLogin()) {
    $ranga = $user->userInfo('ranga');
    if (!$ranga) {
        header("Location: login.php");
    } else {
        if (!empty($_GET['action']) && !empty($_GET['id']) && !empty($_GET['t'])) {
            //USUWANIE OBIEKTU TYPU OBRAZEK
            if ($_GET['action'] == 'delete' && is_numeric($_GET['id']) && $_GET['t'] === $_SESSION['token']) {
                $filename = mysqli_fetch_array(mysqli_query($db, "SELECT * FROM `" . $img_table . "` WHERE id='" . $_GET['id'] . "'"));
                $query_action = mysqli_query($db, "DELETE FROM `" . $img_table . "` WHERE id=" . $_GET['id']) or die(mysql_error());
                if ($query_action) {
                    unlink('../' . $filename['img']);
                    $msg = 'Obrazek został poprawnie usunięty.';
                    header('Location:poczekalnia.php?msg=' . $msg);
                } else {
                    $msg = 'Wystąpił błąd podczas usuwania obrazka.';
                    header('Location:poczekalnia.php?msg=' . $msg);
예제 #28
0
<?
/***
所有由用户直接访问的这些页面

都得先加载 init.php
***/
header('Content-Type:text/html;charset=utf-8');

require('./include/init.php');

$conf = conf::getIns();

/*
echo '<pre>';
print_r($conf);
echo '</pre>';

echo '---------------------获取属性-------------------<br />';
echo '主机是:',$conf->host,'<br />';
echo '用户名是:',$conf->user,'<br />';


echo '----------------------设置属性------------------<br />';
$conf->email = '*****@*****.**';

echo '<pre>';
print_r($conf);
echo '</pre>';

echo '<br />';
var_dump($conf->template_dir);
예제 #29
0
<?php

session_start();
include dirname(dirname(dirname(dirname(__FILE__)))) . "/functions/inc/util.inc.php";
include dirname(dirname(dirname(dirname(__FILE__)))) . "/functions/inc/mydb.inc.php";
include dirname(dirname(dirname(dirname(__FILE__)))) . "/functions/inc/seguridad.php";
include dirname(dirname(dirname(dirname(__FILE__)))) . "/functions/conf/conf.php";
$conf = new conf();
$db = new mydb();
$db->rawData("SET NAMES 'utf8'");
$_SESSION["campos"] = $_POST;
if (trim($_POST["nombre"]) != "" && trim($_FILES["archivo"]["name"]) != "" && trim($_POST["curso"]) != "") {
    $db->rawData("INSERT INTO archivo_curso (ac_archivo,ac_descripcion,curso_id,ac_nombre)" . " VALUES ('','" . addslashes($_POST["descripcion"]) . "'," . $_POST["curso"] . ",'" . addslashes($_POST["nombre"]) . "')");
    $id_max = $db->consulta("SELECT * FROM archivo_curso WHERE 1 ORDER BY ac_id DESC LIMIT 1");
    if ($_FILES["archivo"]["size"] > max_upload_file_size()) {
        header("Location:../../index.php?acc=" . $_POST["acc"] . "&msg=5");
        die;
    }
    if ($_FILES["archivo"]["name"] != "") {
        $ext = obtenerExtension($_FILES["archivo"]["name"]);
        move_uploaded_file($_FILES["archivo"]["tmp_name"], $conf->getRoot() . "/archivos/curso/" . $id_max[0]["ac_id"] . "." . $ext);
        $db->rawData("UPDATE archivo_curso SET ac_archivo='" . $id_max[0]["ac_id"] . "." . $ext . "' WHERE ac_id=" . $id_max[0]["ac_id"]);
    } else {
        if ($_FILES["archivo"]["name"] != "") {
            header("Location:../../index.php?acc=" . $_POST["acc"] . "&msg=2");
            die;
        }
    }
    unset($_SESSION["campos"]);
    header("Location:../../index.php?acc=" . $_POST["acc"] . "&msg=3");
    die;
예제 #30
0
<?php

ob_start();
require_once 'connect.php';
require_once 'include/module/index.class.php';
require_once 'include/module/conf.class.php';
require_once 'include/module/user.class.php';
require_once 'include/module/Content.class.php';
require_once 'include/module/dett.php';
$conf = new conf();
$conf->query(mysqli_query($db, "SELECT * FROM `" . TB_CONF . "` WHERE `id`='1'"));
$user = new user($db);
$user->sessionName('login', 'password');
$obj = new glowna($db);
$theme = $conf->pobierz("theme");
$lang = 'lt';
$contentFileName = 'themes/' . $theme . '/content_' . $lang . '.ini';
$content = new Content($contentFileName, $lang);
if ($user->verifyLogin()) {
    $tentego_glowna = mysqli_num_rows(mysqli_query($db, "SELECT * FROM `{$img_table}` WHERE `is_waiting`='0' AND `author`='" . $user->userInfo('id') . "'"));
    $tentego_poczekalnia = mysqli_num_rows(mysqli_query($db, "SELECT * FROM `{$img_table}` WHERE `is_waiting`='1' AND `author`='" . $user->userInfo('id') . "'"));
    $tentego_last_uploaded = mysqli_fetch_array(mysqli_query($db, "SELECT * FROM `{$img_table}` WHERE `author`='" . $user->userInfo('id') . "' ORDER BY `id` DESC"));
    if (isset($_POST['zmien'])) {
        $info = NULL;
        if (empty($_POST['stare_haslo']) || empty($_POST['nowe_haslo'])) {
            $info = $content->getValue("global", "niewypelniono") . "</span>";
        } else {
            $old_pass = md5($_POST['stare_haslo']);
            if (!mysqli_num_rows(mysqli_query($db, "SELECT * FROM `user` WHERE `login`='" . $user->userInfo('login') . "' and `haslo`='" . $old_pass . "'"))) {
                $info = $content->getValue("profil", "zleHaslo");
            } else {