'; /* ############################ ## smarty settings ## ############################ */ $smarty_compile_check = true; //false is een fractie sneller $smarty_force_compile = true;//false is 20x sneller dan true; $smarty_caching = false; $smarty_compile_dir = '../../templates_c'; /* ############################ ## company settings ## ############################ */ $project_name = 'bookcms'; //wordt gebruikt in namen van mappen en files $company_name = 'bookcms'; $company_admin_email = "info@x.org"; /* ############################ ## database settings ## ############################ */ // mysqladmin -u root password carson include 'db_config.inc.php'; /* ############################ ## config ## ############################ */ $config = array(); $config['is_utf8_enabled'] = true; /* ################################ ## database connection ## ################################ */ $conn = mysql_connect($dbServer, $dbUser, $dbPass) or die("It doesn't connect!"); mysql_select_db($dbDatabase, $conn) or die(mysql_errno() . ": " . mysql_error() . "
"); // if is_utf8_enabled if($config['is_utf8_enabled'] == true){ $q = "SET NAMES 'utf8'"; $r = mysql_query($q) or die('config.inc.php ln 91: Kan query niet uitvoeren: ' . mysql_error() . '
' . $q); } /* ################################ ## bookcms template handling ## ################################ */ /* per boek kan je een template aangeven. deze template staat in een eigen bookcms_conf en bookcms_html in de database staat bij het book welke template erbij hoort */ $config['book_templates'] = array('bookcms' => 'links media en rechts pagina_item of pagina_list' ,'bookcms2' => 'links media, midden pagina_item ,rechts pagina_list' ,'bookcms3' => 'per pagina een of twee of drie media tegelijk in beeld' ,'bookcms_fietsh' => 'alleen paginas (met paginalijst)'); //print_r($_GET); if(isset($_GET['obj_id'])){// haal book op horend bij dit id $d=query2array("select obj_id , obj_parent_id_ref, obj_str_name_slave from cms_object where obj_id = " . $_GET['obj_id']); $q="select obj_id , obj_parent_id_ref, obj_str_name_slave from cms_object where obj_id = " ; if($d['obj_str_name_slave'] == 'media'){ //echo 'media
'; $d=query2array($q . $d['obj_parent_id_ref']); } if($d['obj_str_name_slave'] == 'page'){ //echo 'page
'; $d=query2array($q . $d['obj_parent_id_ref']); } if($d['obj_str_name_slave'] == 'chapter'){ //echo 'chapter
'; $d=query2array($q . $d['obj_parent_id_ref']); } if($d['obj_str_name_slave'] == 'filter'){ //echo 'chapter
'; $d=query2array($q . $d['obj_parent_id_ref']); } if($d['obj_str_name_slave'] == 'book'){ //echo 'book
'; $d=query2array("select obj_id, obj_name, obj_template as book_template, obj_headline as use_translations from cms_object where obj_id = " . $d['obj_id']); } }elseif(isset($_GET['obj_name'])){ // haal book op met naam $d=query2array("select obj_id, obj_name, obj_template as book_template, obj_headline as use_translations from cms_object where obj_name = '" . $_GET['obj_name'] ."'"); }else{//haal eerste book op $d=query2array("select obj_id, obj_name, obj_template as book_template, obj_headline as use_translations from cms_object where obj_str_name_slave = 'book' " . " ORDER BY obj_order ASC LIMIT 0 , 1"); } //echo $d['book_template'] . '
'; $config['current_book_template'] = $d['book_template']; $config['current_book_id'] = $d['obj_id']; $config['current_book_use_translations'] = $d['use_translations']; if($config['current_book_template'] == '' )$config['current_book_template'] = 'bookcms'; $config['custom_config_dir'] = '../../'.$config['current_book_template'].'_conf'; $config['html_4_anon'] = '../../'.$config['current_book_template'].'_html'; //echo 'custom_config_dir = ' . $config['custom_config_dir'] . '
'; //echo 'html_4_anon = ' .$config['html_4_anon'] . '
'; //______________________________________________________________________________ function query2array($query){ $result = mysql_query($query) or die('Kan query2array niet uitvoeren: ' . mysql_error() . '
' . $query); $data=array(); while ($record = mysql_fetch_assoc($result)) { foreach($record as $k2 => $v2){ $record[$k2] = stripslashes($record[$k2]);} $data[] = $record; } return $data[0]; } //______________________________________________________________________________ //______________________________________________________________________________ /* ############################ ## config settings ## ############################ */ //$config = array(); $config['project_name'] = $project_name; $config['limit_count'] = 30; //blader-functionaliteit $config['default_lang'] = 'dut'; $config['maxfilesize4upload'] = 30 * 1024 * 1024; //$maxfilesize4upload; $config['maxfilesize4upload_human'] = '30 Megabyte'; //$maxfilesize4upload_human; //TODO: verplaats deze naar custom_conf.inc.php $config['index_4_anon'] = $config['custom_config_dir'] . '/inc/visitor_index.inc.php';//'amcms.php'; $config['index_4_logged_in'] = 'common_index.php'; //'../../cms_html'; $config['html_4_logged_in'] = '../../cms_html'; //'../../cms_html'; //$config['compile_dir_4_anon'] = '../../iprn_templates_c'; //$config['compile_dir_4_logged_in'] = '../../iprn_templates_c'; $config['compile_dir_4_anon'] = '../../templates_c/visitor_html'; $config['compile_dir_4_logged_in'] = '../../templates_c/cms_html'; $config['compile_dir_edit'] = '../../templates_c/cms_edit'; //$config['obj_body_slave_maxChar']= 100; /* ############################ ## debug level ## ## 0 = NONE ## 1 = ERROR ## 2 = WARNING ## 3 = MESSAGE ## 4 = DEBUG ## ## usage: ## ----------------------- ## $_SESSION['debug_arr'][] = array('DEBUG' => 'bla bla'); ## ----------------------- ## if($config['debug_level'] == 'DEBUG'){$_SESSION['debug_arr'][] = array('DEBUG' => print_r($_POST , 1)); } ## ----------------------- ############################ */ $config['debug_level'] = 'NONE'; //moet de naam zijn. niet het getal $config['ontwikkel_debug'] = $ontwikkel_debug; /* ======================================== // alleen voor PIW $config['cwolk_domain'] = 'www.poetryinternational.org'; // interstroom $mig_server_url = 'http://www.poetryinternationalweb.org/piw_migrate_server/'; $migratefile_dir = "/var/www/html/piw_ontw/cwolkmigratefiles/"; // piw_ontw $migratefile_url = "http://www.poetryinternationalweb.org/cwolkmigratefiles/"; ======================================== */ /* ======================================== // alleen voor Studio Rotterdam ======================================== */ //$config['movie_location_root'] = 'http://studio-antenna-men.dyndns.org/studiorotterdam/mockup_html/films'; //o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o // don't touch ! //-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o- $abs_path= $html_root.$project_name.$directory_postfix; $APP_ROOT = $html_root.$project_name.$directory_postfix.'/cms/'; $CMS_ROOT = $APP_ROOT . 'cms_module/'; $ACL_ROOT = $APP_ROOT . 'acl_module/'; $TYPE_ROOT = $APP_ROOT . 'type_module/'; ini_set('include_path', ini_get('include_path') . ':' . $APP_ROOT ); ini_set('include_path', ini_get('include_path') . ':' . $CMS_ROOT ); ini_set('include_path', ini_get('include_path') . ':' . $ACL_ROOT ); ini_set('include_path', ini_get('include_path') . ':' . $TYPE_ROOT ); //echo '
';print_r($config);echo '
'; //echo '-0-'.$www_root.$project_name.$directory_postfix.'/cms/'.'cms_module/'.'initialize.inc.php'; //echo '
'. getcwd() . '
'; //require_once $www_root.$project_name.$directory_postfix.'/cms/'.'cms_module/'.'initialize.inc.php'; //require_once '../cms_module/initialize.inc.php'; // uses: // - get session // - get state require_once 'initialize.inc.php'; // uses: // - get session // - get state require_once 'includes.inc.php'; ?>