function mysqliCheck(){
global $mysqli;
if(is_resource($mysqli) && get_resource_type($mysqli)==='mysql link')
return true;
else
return false;
}
?>
$mysqli = new mysqli($config['slab_dbhost'],$config['slab_dbuser'],$config['slab_dbpw'],$config['slab_dbname']) or die($mysqli->connect_error);
$page = preg_replace('/[^a-z0-9\-]/','',$page);
$pagetitle = preg_replace('/[^a-z0-9\-]/','%',$page);
if($page == 'contact' && $config['v'] < '2.3.4') $page = 'contactus';
if(!in_array($page, $config['all_modules'])){
$sql = "select id from $multitable where title like '%$pagetitle%' or custom_url like '$page' order by id desc limit 0,1";
$result = $mysqli->query($sql);
$total = $mysqli->affected_rows;
if($total == 1){
$row = $result->fetch_array(MYSQLI_ASSOC);
$foundpage = find_this_page($row['id']);
slab_refresh($foundpage);
} else {
slab_whack_hack($page,$table_prefix);
}
}
$subpages = array('downloads','gigs');
$newpage = array('resources','calendar');
if(isset($config['slab_seo']) && $config['v'] < '2.3.4')
include $common_path.'/seo/meta.php'; // keep this here! 2009-09-09
/*
if($config['slab500_tracking']){ // only by demand - too huge.
$userid = intval($_SESSION['SLAB500_userid']);
if(empty($_SESSION['SLAB500_visitor'])){
session_register('SLAB500_visitor');
$_SESSION['SLAB500_visitor'] = session_id();
} // if there is no unique session for this visitor, create one.
$session = $_SESSION['SLAB500_visitor'];
$query = preg_replace('/[^a-z0-9\-\?=&\.%;]/i','',$_SERVER['QUERY_STRING']);
$sql = "insert into zz_tracking set prefix = '$table_prefix', type = 'page view', session = '$session', userid = $userid, query = '$query', updated = now()";
if($session) $trackit = $mysqli->query($sql) or die(mysql_error());
}
*/
// quick display DEPRICATED?
/*
if(!$_GET['page'] && !$_GET['family'] && !$_GET['category'] && !$_GET['display'] && ($_GET['d'] || $_GET['c'])){
if(is_numeric($_GET['d'])) $getquickresult = mysql_query("select id from $multitable where id = ".intval($_GET['d'])." limit 0,1 ") or die('could not quick select');
elseif(!is_numeric($_GET['c'])) $getquickresult = mysql_query("select id from $multitable where category like '%".clean_it($_GET['c'])."' limit 0,1 ") or die('could not quick select');
$row = mysql_fetch_row($getquickresult);
$foundpage = find_this_page($row[0]);
if($_GET['page'] != '404')
slab_refresh($foundpage);
else
echo 'not found';
} // if quick display
*/
//for custom_url
//if($_GET['p'])
// $page = 'p';
$mysqli->close();
?>
index_headers('light',true,true); ?>
$setvars = array('news_multiplacement_top','news_orderby','multiplacement_top','news_intro_header','news_intro_links_to_source','attach_comments','intro_editbuttons');
foreach($setvars as $setvar){
if(empty($config[$setvar])){
$config[$setvar] = NULL;
}
}
$themodule = 'news';
$thepage = 'news';
$thepath = 'common';
if(empty($config['news_orderby']))
$orderby = 'family asc, category asc, featured desc, date desc, updated desc';
else
$orderby = $config['news_orderby'];
$menu_images = 'no';
if(isset($config['menu_photo'])){
if($config['menu_photo'] == 'no' || $config['menu_photo'] = 'none'){
$menu_images = 'yes';
}
}
if(isset($config['news_menu_photo'])){
if($config['news_menu_photo'] != 0){
$menu_images = 'yes';
}
}
if(isset($config['menu_images'])){
if($config['menu_images'] == 'yes'){
$menu_images = 'yes';
}
}
$config['archives_orderby'] = 'family asc, category asc, date desc, updated desc ';
if(isset($config['news_displaylimit'])){ // spelling error
$config['news_display_limit'] = $config['news_displaylimit'];
}
if(isset($config['news_display_limit'])){
$displaylimit = $config['news_display_limit'];
} else {
$displaylimit = 1;
}
if((isset($enable_user_comments) && $enable_user_comments == 'yes') || isset($config['attach_comments']))
$displaylimit = 1;
if(isset($config['news_increment'])){
$news_increment = $config['news_increment'];
} else {
$news_increment = 12;
}
$increment = $news_increment;
if(isset($config['news_picwidth'])){
$page_picwidth = $config['news_picwidth'];
} else {
$page_picwidth = 600;
}
$page_thumb = 320;
$input_title = "TITLE";
$input_date = "DATE";
$input_featured = "FEATURED";
$input_introduction = 'none';
$input_featured_descript = "If selected, this item will show up as a featured news item on the home page - whether it is the most recent new item or not. It will also move to the top of the subnavigation.";
$input_featured_two = "INTRODUCTION";
$input_body = "BODY";
if(isset($config['news_subtitles'])|| isset($config['news_subtitle'])){
$input_title1 = 'SUBTITLE';
} else {
$input_title1 = '';
}
$input_file = "IMAGE";
$placement = "yes";
$input_caption = "IMAGE CAPTION";
$input_image_clickable = true;
$input_url1 = "LINK";
$input_url2 = "LINK";
$input_url3 = "LINK";
if(isset($config['news_excerpts']) && $config['SLAB500_user_info']['user_level'] == 1){
$input_body1 = "EXCERPT TEXT";
} else {
$input_body1 = '';
}
$config['multifield_descriptions']['body1'] = 'Excerpt for this news entry to show on introduction page';
if(isset($config['news_paypal'])){
$input_body2 = "PAYPAL SCRIPT";
} else {
$input_body2 = '';
}
$config['multifield_descriptions']['body2'] = 'Embed script for PayPal button (html, not link)';
if(isset($config['news_families'])){
$input_family = "SECTION";
} else {
$input_family = '';
}
$input_category = "CATEGORY";
if(empty($config['news_extra_files'])){
$config['news_extra_files'] = 99;
}
$input_extrafiles = $config['news_extra_files'];
$input_extrafiles_name = 'ADDITONAL IMAGE';
$input_title4 = 'SUBNAVIGATION TITLE (OPTIONAL)';
$config['tag_cloud_module'] = true;
$add_minigallery = true;
if(isset($config['custom_urls'])){
$input_custom_url = 'TRAILING URL (follows '.$config['url'].'/'.$themodule.'/...)';
} else {
$input_custom_url = '';
}
// dbfield => array(type,label,size,mods,options,description)
$multifields = array(
'featured' => array('radio','set','full',NULL,$config['featured_options'], $config['multifield_descriptions']['featured']),
'family' => array('catfam',$input_family,'full', NULL, NULL, $config['multifield_descriptions']['family']),
'category' => array('catfam',$input_category,'full', NULL,NULL, $config['multifield_descriptions']['category']),
'title' => array('text',$input_title,'full', NULL,NULL, $config['multifield_descriptions']['title']),
'title1' => array('text',$input_title1,'full', NULL,NULL, $config['multifield_descriptions']['title1']),
'date' => array('date',$input_date,'half',NULL,NULL, $config['multifield_descriptions']['date']),
'file_name' => array('file','main '.$input_file,'threequarters', NULL, NULL, $config['multifield_descriptions']['file_name']),
'alt' => array('text','alt text for image','quarter', NULL, NULL, $config['multifield_descriptions']['alt']),
'file_placement' => array('radio','image placement','quarter', NULL, $config['file_placements'], $config['multifield_descriptions']['file_placement']),
'caption' => array('body','image caption','quarter', 'short', NULL, $config['multifield_descriptions']['caption']),
'body' => array('body',$input_body,'full', 'editor', NULL, $config['multifield_descriptions']['body']),
'extrafiles' => array('extrafiles',$input_extrafiles_name.'S', 'full', $input_extrafiles, NULL, $config['multifield_descriptions']['extrafiles']),
'body1' => array('body',$input_body1,'full', 'editor', NULL, $config['multifield_descriptions']['body1']),
'body2' => array('body',$input_body2,'full', NULL, NULL, $config['multifield_descriptions']['body2']),
'url1' => array('text',$input_url1,'half', NULL, NULL, $config['multifield_descriptions']['url1']),
'url1name' => array('text',$input_url1.' label','half', NULL, NULL, $config['multifield_descriptions']['url1name']),
'url2' => array('text',$input_url2,'half', NULL, NULL, $config['multifield_descriptions']['url2']),
'url2name' => array('text',$input_url2.' label','half', NULL, NULL, $config['multifield_descriptions']['url2name']),
'url3' => array('text',$input_url3,'half', NULL, NULL, $config['multifield_descriptions']['url3']),
'url3name' => array('text',$input_url3.' label','half', NULL, NULL, $config['multifield_descriptions']['url3name']),
'title4' => array('text',$input_title4,'full', NULL, NULL, $config['multifield_descriptions']['title4']),
'custom_url' => array('text',$input_custom_url,'full', NULL, NULL, $config['multifield_descriptions']['custom_url']),
);
?>
// SLAB500 - multi functions v.2.3.3 2013-06-02
//
// no portion of these functions my be used for any other project than one
// specified by either Catherine or Jim Infantino or another
// executive director of SLABmedia.com
//
// When working here - please comment brief description of change and
// add you name and the date.
//
// cheers! - Jim Infantino, creator SLAB500 - jim@slabmedia.com
//
//~~~~~~~ ~~~~~~ ~~~~~ ~~~~ ~~~ ~~ ~ MULTI FUNCTIONS
$multi_functions = array(
'cache_pages',
'choose_catfam',
'date_menu',
'delete_slags',
'display_featured_custom',
'display_featured',
'display_it',
'input_update',
'list_category',
'list_menu',
'menu_categories_only',
'menu_categories',
'multi_image_placement',
'multi_slideshow',
'shuffle_assoc',
'slab_ics_input',
'slab_tagcloud',
'unfeature_all'
);
foreach($multi_functions as $fname){
include $home_common_path.'/multi/'.$config['v'].'/'.$fname.'.php';
}
?>
// SLAB500 - common multi index.php v.2.0 2013-02-22
// (c)2007 Jim Infantino / Catherine Infantino / SLABmedia.com
// no portion of these functions my be used for any other project than one
// specifically specified by either Catherine or Jim Infantino or another
// executive director of SLABmedia.com
//
// When working here - please comment brief description of change and
// add you name and the date.
//
// cheers! - Jim Infantino, creator SLAB500 - jim@slabmedia.com
//
//////////////////////////////////////////////////////////////////////////////////////
if(!$common_path)
die('no can do');
include $common_path.'/includes/usermenu.php';
if($config['v'] < '2.3.4')
include $home_common_path.'/multi/2.3.3/index.php';
else
include $home_common_path.'/multi/'.$config['v'].'/index.php';
?>
if(!$config['custom_login_button']){
$logoutbutton = 'LOG OUT';
$loginbutton = 'LOG IN';
} else {
$logoutbutton = 'log out';
$loginbutton = $config['custom_login_button'];
}
$login_button = $loginbutton;
$logout_button = $logoutbutton;
$addslablogoclass = '';
$nofollow = '';
if(isset($config['slabfooter'])){
if($config['slabfooter'] == 'lightgray' || $config['slabfooter'] == 'dark') $addslablogoclass = 'dark';
if($config['slabfooter'] == 'black') $addslablogoclass = 'black';
if($config['slabfooter'] == 'darker') $addslablogoclass = 'dark';
if($config['slabfooter'] == 'white') $addslablogoclass = 'white';
if($config['slabfooter'] == 'whitered') $addslablogoclass = 'whitered';
if($config['slabfooter'] == 'gray') $addslablogoclass = 'gray';
if($addslablogoclass)
$addslabfooterclass = ' class="'.$addslablogoclass.'"';
} else {
$addslabfooterclass = '';
}
if(isset($config['footer_year'])){
$theyear = $config['footer_year'];
} else {
$theyear = date('Y');
}
?>
// set variables for php 8.x
$phone1options = '';
$available_languages = '';
$scriptend = '';
$mysqli = new mysqli($config['slab_dbhost'],$config['slab_dbuser'],$config['slab_dbpw'],$config['slab_dbname']) or die($mysqli->connect_error);
$sqlcc = "select * from $multitable where module like 'contact' and featured < 5 order by display_order asc";
$resultcc = $mysqli->query($sqlcc) or die($sqlcc);
$totalcc = $mysqli->affected_rows;
if($totalcc){
$context = 'http://schema.org';
$type = 'Organization';
$url = $config['full_url'];
$atttype = 'ContactPoint';
$scriptstart = '';
$innerscript = $script1.$script2.$script3;
$innerscript = substr($innerscript,0,-4);
$innerscript .= ']'."\r\n";
echo $scriptstart.$innerscript.$scriptend;
} // total
?>