function upcoming_eot() { global $dbtable_prefix; $config['days_before'] = 4; $query_strlen = 20000; $now = gmdate('Ymd'); $query = "SELECT b.`email`,c.`_user` as `user` FROM `{$dbtable_prefix}payments` a,`" . USER_ACCOUNTS_TABLE . "` b,`{$dbtable_prefix}user_profiles` c WHERE a.`fk_user_id`=b.`" . USER_ACCOUNT_ID . "` AND a.`fk_user_id`=c.`fk_user_id` AND a.`paid_until`='{$now}'-INTERVAL " . $config['days_before'] . " DAY AND a.`is_active`=1 AND a.`is_recurring`=0"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } $alerts = array(); while ($rsrow = mysql_fetch_assoc($res)) { $alerts[$rsrow['email']] = $rsrow; } if (!empty($alerts)) { $skin = get_default_skin_dir(); $tpl = new phemplate(_BASEPATH_ . '/skins_site/' . $skin . '/emails/', 'remove_nonjs'); $tpl->set_file('temp', 'subscr_expire_alert.html'); $tpl->set_var('tplvars', $tplvars); $subject = sprintf($GLOBALS['_lang'][218], _SITENAME_); $subject = sanitize_and_format($subject, TYPE_STRING, $GLOBALS['__field2format'][FIELD_TEXTFIELD]); $insert = "INSERT INTO `{$dbtable_prefix}queue_email` (`to`,`subject`,`message_body`) VALUES "; $iquery = $insert; foreach ($alerts as $email => $v) { $tpl->set_var('output', $v); $message_body = $tpl->process('', 'temp', TPL_LOOP | TPL_OPTLOOP | TPL_OPTIONAL | TPL_FINISH); $message_body = sanitize_and_format($message_body, TYPE_STRING, $GLOBALS['__field2format'][FIELD_TEXTAREA]); if (strlen($iquery) > $query_strlen) { $iquery = substr($iquery, 0, -1); if (!($res = @mysql_query($iquery))) { trigger_error(mysql_error(), E_USER_ERROR); } $iquery = $insert; } $iquery .= "('{$email}','{$subject}','{$message_body}'),"; } if ($iquery != $insert) { $iquery = substr($iquery, 0, -1); if (!($res = @mysql_query($iquery))) { trigger_error(mysql_error(), E_USER_ERROR); } } } return true; }
Etano =============================================================================== File: my_responses.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require 'includes/common.inc.php'; require _BASEPATH_ . '/includes/user_functions.inc.php'; require _BASEPATH_ . '/includes/tables/user_mtpls.inc.php'; require _BASEPATH_ . '/skins_site/' . get_my_skin() . '/lang/mailbox.inc.php'; check_login_member('saved_messages'); $tpl = new phemplate(_BASEPATH_ . '/skins_site/' . get_my_skin() . '/', 'remove_nonjs'); $o = isset($_GET['o']) ? (int) $_GET['o'] : 0; $r = !empty($_GET['r']) ? (int) $_GET['r'] : current($accepted_results_per_page); $config['bbcode_message'] = get_site_option('bbcode_message', 'core'); $from = "`{$dbtable_prefix}user_mtpls`"; $where = "`fk_user_id`='" . $_SESSION[_LICENSE_KEY_]['user']['user_id'] . "'"; $query = "SELECT count(*) FROM {$from} WHERE {$where}"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } $totalrows = mysql_result($res, 0, 0); $loop = array(); if (!empty($totalrows)) { if ($o >= $totalrows) { $o = $totalrows - $r; $o = $o >= 0 ? $o : 0;
/****************************************************************************** Etano =============================================================================== File: admin/loc_countries_addedit.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require_once '../includes/common.inc.php'; require_once '../includes/admin_functions.inc.php'; require_once '../includes/tables/loc_countries.inc.php'; allow_dept(DEPT_ADMIN); $tpl = new phemplate('skin/', 'remove_nonjs'); $countries = $countries_default['defaults']; if (isset($_SESSION['topass']['input'])) { $countries = $_SESSION['topass']['input']; } elseif (!empty($_GET['country_id'])) { $country_id = (int) $_GET['country_id']; $query = "SELECT `country_id`,`country`,`iso3166`,`prefered_input` FROM `{$dbtable_prefix}loc_countries` WHERE `country_id`={$country_id}"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } if (mysql_num_rows($res)) { $countries = mysql_fetch_assoc($res); $countries['country'] = sanitize_and_format($countries['country'], TYPE_STRING, $__field2format[TEXT_DB2EDIT]); } } $countries['prefered_input'] = vector2options($country_prefered_input, $countries['prefered_input']);
/****************************************************************************** Etano =============================================================================== File: admin/subscriptions.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require_once '../includes/common.inc.php'; require_once '../includes/admin_functions.inc.php'; allow_dept(DEPT_ADMIN); $tpl = new phemplate('skin/', 'remove_nonjs'); $where = 'a.`m_value_to`=b.`m_value`'; $from = "`{$dbtable_prefix}subscriptions` a,`{$dbtable_prefix}memberships` b"; $query = "SELECT count(*) FROM {$from} WHERE {$where}"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } $totalrows = mysql_result($res, 0, 0); $subscriptions = array(); if (!empty($totalrows)) { $query = "SELECT a.`subscr_id`,a.`subscr_name`,a.`price`,a.`currency`,a.`is_recurent`,b.`m_name` as `m_value_to`,a.`duration`,a.`is_visible` FROM {$from} WHERE {$where} ORDER BY a.`subscr_id`"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } while ($rsrow = mysql_fetch_assoc($res)) { $rsrow['currency'] = isset($accepted_currencies[$rsrow['currency']]) ? $accepted_currencies[$rsrow['currency']] : '';
<?php /****************************************************************************** Etano =============================================================================== File: admin/blog_search.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require_once '../includes/common.inc.php'; require_once '../includes/admin_functions.inc.php'; allow_dept(DEPT_ADMIN); $tpl = new phemplate('skin/', 'remove_nonjs'); $output = array(); $output['stat'] = vector2options($accepted_pstats); $tpl->set_file('content', 'blog_search.html'); $tpl->set_var('output', $output); $tpl->process('content', 'content', TPL_LOOP); $tplvars['title'] = 'Search'; $tplvars['css'] = 'blog_search.css'; $tplvars['page'] = 'blog_search'; include 'frame.php';
$Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require '../includes/common.inc.php'; require _BASEPATH_ . '/includes/admin_functions.inc.php'; allow_dept(DEPT_MODERATOR | DEPT_ADMIN); // cleanup after an 'impersonate user' action if (isset($_GET['clean_user_session'])) { $_SESSION[_LICENSE_KEY_]['user'] = array(); unset($_SESSION[_LICENSE_KEY_]['user']); } $tpl = new phemplate('skin/', 'remove_nonjs'); $output = array('_user' => ''); // needed for the title $output['search_md5'] = sanitize_and_format_gpc($_GET, 'search', TYPE_STRING, $__field2format[FIELD_TEXTFIELD], ''); $uid = 0; if (!empty($_GET['uid'])) { $uid = (int) $_GET['uid']; if (!empty($output['search_md5']) && isset($_GET['go']) && ($_GET['go'] == 1 || $_GET['go'] == -1)) { $query = "SELECT `results` FROM `{$dbtable_prefix}site_searches` WHERE `search_md5`='" . $output['search_md5'] . "'"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } if (mysql_num_rows($res)) { $user_ids = mysql_result($res, 0, 0); $user_ids = explode(',', $user_ids); $key = array_search($uid, $user_ids) + $_GET['go'];
/****************************************************************************** Etano =============================================================================== File: admin/access_levels.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require_once '../includes/common.inc.php'; require_once '../includes/admin_functions.inc.php'; allow_dept(DEPT_ADMIN); $tpl = new phemplate('skin/', 'remove_nonjs'); $query = "SELECT `m_id`,`m_name`,`m_value`,`is_custom` FROM `{$dbtable_prefix}memberships` ORDER BY `m_id`"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } $memberships = array(); $i = 0; while ($rsrow = mysql_fetch_assoc($res)) { $memberships[$i] = $rsrow; if ($memberships[$i]['is_custom']) { $memberships[$i]['m_name'] .= ' <a href="javascript:;" onclick="del_membership(' . $memberships[$i]['m_id'] . ')" title="Delete this membership"><img src="skin/images/del.png" alt="Delete this membership" /></a>'; } ++$i; } $query = "SELECT `level_id`,`level_code`,`level_diz`,`level`,`disabled_level` FROM `{$dbtable_prefix}access_levels`"; if (!($res = @mysql_query($query))) {
/****************************************************************************** Etano =============================================================================== File: index.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ //define('CACHE_LIMITER','private'); require 'includes/common.inc.php'; require _BASEPATH_ . '/includes/user_functions.inc.php'; check_login_member('all'); $tpl = new phemplate(_BASEPATH_ . '/skins_site/' . get_my_skin() . '/', 'remove_nonjs'); $tpl->set_file('content', 'index.html'); sort($basic_search_fields, SORT_NUMERIC); $search_loop = create_search_form($basic_search_fields); $tplvars['title'] = $tplvars['sitename']; $tpl->set_loop('search', $search_loop); $tpl->set_var('tplvars', $tplvars); $tpl->process('content', 'content', TPL_OPTIONAL | TPL_LOOP); if (!empty($GLOBALS['page_last_modified_time'])) { // header('Expires: '. gmdate('D,d M Y H:i:s',time()+1209600).' GMT',true); // +14 days // header('Expires: -1',true); header('Cache-Control: private, max-age=0', true); header('Last-Modified: ' . date('D,d M Y H:i:s', $GLOBALS['page_last_modified_time']) . ' GMT', true); } echo $tpl->process('content', 'content', TPL_FINISH | TPL_INCLUDE);
/****************************************************************************** Etano =============================================================================== File: admin/email_send.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require_once '../includes/common.inc.php'; require_once '../includes/admin_functions.inc.php'; allow_dept(DEPT_ADMIN); $tpl = new phemplate('skin/', 'remove_nonjs'); $output = array(); if (isset($_SESSION['topass']['input'])) { $output = $_SESSION['topass']['input']; $output['return2'] = $output['return']; $output['return'] = rawurlencode($output['return']); } else { if (!empty($_REQUEST['search'])) { $output['search'] = sanitize_and_format_gpc($_REQUEST, 'search', TYPE_STRING, $__field2format[FIELD_TEXTFIELD], ''); $query = "SELECT `results` FROM `{$dbtable_prefix}site_searches` WHERE `search_md5`='" . $output['search'] . "' AND `search_type`=" . SEARCH_USER; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } if (mysql_num_rows($res)) { $results = mysql_result($res, 0, 0); $output['uids'] = explode(',', $results);
=============================================================================== File: photo_view.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ //define('CACHE_LIMITER','private'); require 'includes/common.inc.php'; require _BASEPATH_ . '/includes/user_functions.inc.php'; require _BASEPATH_ . '/skins_site/' . get_my_skin() . '/lang/photos.inc.php'; require _BASEPATH_ . '/includes/network_functions.inc.php'; check_login_member('view_photo'); $tpl = new phemplate(_BASEPATH_ . '/skins_site/' . get_my_skin() . '/', 'remove_nonjs'); $photo_id = sanitize_and_format_gpc($_GET, 'photo_id', TYPE_INT, 0, 0); $output = array(); $output['pic_width'] = get_site_option('pic_width', 'core_photo'); $loop_comments = array(); if (!empty($photo_id)) { $query = "SELECT `photo_id`,`is_private`,`photo`,`caption`,`fk_user_id`,`_user` as `user`,`status`,`allow_comments`,`allow_rating`,`stat_votes`,`stat_votes_total` FROM `{$dbtable_prefix}user_photos` WHERE `photo_id`={$photo_id}"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } if (mysql_num_rows($res)) { $output = array_merge($output, mysql_fetch_assoc($res)); $is_friend = false; if (!empty($_SESSION[_LICENSE_KEY_]['user']['user_id'])) { $is_friend = is_network_member($output['fk_user_id'], $_SESSION[_LICENSE_KEY_]['user']['user_id'], NET_FRIENDS); }
/****************************************************************************** Etano =============================================================================== File: admin/loc_countries.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require_once '../includes/common.inc.php'; require_once '../includes/admin_functions.inc.php'; allow_dept(DEPT_ADMIN); $tpl = new phemplate('skin/', 'remove_nonjs'); $o = isset($_GET['o']) ? (int) $_GET['o'] : 0; $r = isset($_GET['r']) ? (int) $_GET['r'] : current($accepted_results_per_page); $where = '1'; $from = "`{$dbtable_prefix}loc_countries`"; $query = "SELECT count(*) FROM {$from} WHERE {$where}"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } $totalrows = mysql_result($res, 0, 0); $countries = array(); if (!empty($totalrows)) { if ($o >= $totalrows) { $o = $totalrows - $r; $o = $o >= 0 ? $o : 0; }
/****************************************************************************** Etano =============================================================================== File: search_more.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ //define('CACHE_LIMITER','private'); require 'includes/common.inc.php'; require _BASEPATH_ . '/includes/user_functions.inc.php'; check_login_member('search_advanced'); $tpl = new phemplate(_BASEPATH_ . '/skins_site/' . get_my_skin() . '/', 'remove_nonjs'); $search_fields = array(); foreach ($_pcats as $pcat_id => $pcat) { if ((int) $pcat['access_level'] & (int) $_SESSION[_LICENSE_KEY_]['user']['membership']) { for ($i = 0; isset($pcat['fields'][$i]); ++$i) { if (isset($_pfields[$pcat['fields'][$i]]->config['searchable'])) { $search_fields[] = $pcat['fields'][$i]; } } } } sort($search_fields, SORT_NUMERIC); $search_loop = create_search_form($search_fields); $tpl->set_file('content', 'search_more.html'); $tpl->set_loop('search', $search_loop); $tpl->process('content', 'content', TPL_LOOP);
Etano =============================================================================== File: admin/user_login.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require_once '../includes/common.inc.php'; require_once '../includes/admin_functions.inc.php'; allow_dept(DEPT_ADMIN | DEPT_MODERATOR); $output['uid'] = sanitize_and_format_gpc($_GET, 'uid', TYPE_INT, 0, 0); $output['return'] = sanitize_and_format_gpc($_GET, 'return', TYPE_STRING, $__field2format[FIELD_TEXTFIELD], ''); $tpl = new phemplate('skin/', 'remove_nonjs'); if (isset($_GET['top'])) { $content_file = 'user_login_top.html'; $tpl->set_var('user', $_SESSION[_LICENSE_KEY_]['user']); } else { $content_file = 'user_login.html'; if (strpos($output['return'], '?') === false) { $qs_sep = '?'; } else { $qs_sep = '&'; } $output['return'] .= $qs_sep . 'clean_user_session=1'; $output['return'] = rawurlencode($output['return']); $query = "SELECT a.`" . USER_ACCOUNT_ID . "` as `user_id`,b.`_user` as `user`,a.`status`,a.`membership`,UNIX_TIMESTAMP(a.`last_activity`) as `last_activity`,a.`email`,b.`status` as `pstat` FROM `" . USER_ACCOUNTS_TABLE . "` a LEFT JOIN `{$dbtable_prefix}user_profiles` b ON a.`" . USER_ACCOUNT_ID . "`=b.`fk_user_id` WHERE a.`" . USER_ACCOUNT_ID . "`=" . $output['uid']; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR);
echo "<br>checkpoint[ini]: " . round(getmicrotime() - $pradedam, 2); } if (empty($lang) || $lang != 'lt' && $lang != 'en') { $lang = $g_ini->read_var('site', 'Language'); } $lang = clean_name($lang); include_once $RELPATH . $LANGPATH . $lang . '.inc.php'; if (isset($GLOBALS['bench'])) { echo "<br>checkpoint[lang]: " . round(getmicrotime() - $pradedam, 2); } $g_db = new avDb(); if (isset($GLOBALS['bench'])) { echo "<br>checkpoint[db]: " . round(getmicrotime() - $pradedam, 2); } $g_sess = new avSession(); if (isset($GLOBALS['bench'])) { echo "<br>checkpoint[session]: " . round(getmicrotime() - $pradedam, 2); } $g_tpl = new phemplate($RELPATH, 'keep'); $g_tpl->set_error_handler(&$g_error); $g_tpl->set_var('RELPATH', $RELPATH); //$g_tpl->set_var('G_PHP_SELF', $PHP_SELF); $g_tpl->set_var('G_PHP_SELF', $_SERVER["PHP_SELF"]); $g_tpl->set_var('lang', $g_lang); $avms_version = '2.1'; $g_tpl->set_var('avms_version', $avms_version); $g_tpl->set_var('users_online', $g_sess->users_online("registered")); if (empty($g_user_id) || !$g_sess->userID) { $g_user_id = false; } $g_usr = new avUser($g_user_id);
/****************************************************************************** Etano =============================================================================== File: admin/user_payment_history.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require_once '../includes/common.inc.php'; require_once '../includes/admin_functions.inc.php'; allow_dept(DEPT_ADMIN); $tpl = new phemplate('skin/', 'remove_nonjs'); $loop = array(); $output = array(); if (!empty($_GET['uid'])) { $output['uid'] = (int) $_GET['uid']; $query = "SELECT `m_value`,`m_name` FROM `{$dbtable_prefix}memberships`"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } $memberships = array(); while ($rsrow = mysql_fetch_row($res)) { $memberships[$rsrow[0]] = $rsrow[1]; } $config = get_site_option(array('date_format', 'time_offset'), 'def_user_prefs'); $query = "SELECT `payment_id`,`fk_user_id`,`_user`,`gateway`,`gw_txn`,`name`,`country`,`email`,`is_subscr`,`m_value_to`,`amount_paid`,`refunded`,UNIX_TIMESTAMP(`paid_from`) as `paid_from`,UNIX_TIMESTAMP(`paid_until`) as `paid_until`,UNIX_TIMESTAMP(`date`) as `date`,`is_suspect`,`suspect_reason` FROM `{$dbtable_prefix}payments` WHERE `fk_user_id`=" . $output['uid'] . " ORDER BY `payment_id`"; if (!($res = @mysql_query($query))) {
/****************************************************************************** Etano =============================================================================== File: admin/error_log_view.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require_once '../includes/common.inc.php'; require_once '../includes/admin_functions.inc.php'; allow_dept(DEPT_ADMIN); $tpl = new phemplate('skin/', 'remove_nonjs'); if (!empty($_GET['log_id'])) { $log_id = (int) $_GET['log_id']; $query = "SELECT `error` FROM `{$dbtable_prefix}error_log` WHERE `log_id`={$log_id}"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } if (mysql_num_rows($res)) { $output = mysql_fetch_assoc($res); } } if (empty($output['return'])) { $output['return2'] = sanitize_and_format_gpc($_GET, 'return', TYPE_STRING, $__field2format[FIELD_TEXTFIELD], ''); $output['return'] = rawurlencode($output['return2']); } $tpl->set_file('content', 'error_log_view.html');
/****************************************************************************** Etano =============================================================================== File: admin/payment_history.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require_once '../includes/common.inc.php'; require_once '../includes/admin_functions.inc.php'; allow_dept(DEPT_ADMIN); $tpl = new phemplate('skin/', 'remove_nonjs'); $output = array(); if (!empty($_GET['date_start'])) { $output['date_start'] = date('Y-m-d', strtotime($_GET['date_start'])); } else { $output['date_start'] = date('Y-m-01'); } if (!empty($_GET['date_end'])) { $output['date_end'] = $_GET['date_end']; } else { $output['date_end'] = date('Y-m-t'); } $query = "SELECT `m_value`,`m_name` FROM `{$dbtable_prefix}memberships`"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); }
=============================================================================== File: install/step3.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ ini_set('include_path', '.'); ini_set('session.use_cookies', 1); ini_set('session.use_trans_sid', 0); ini_set('date.timezone', 'GMT'); // temporary fix for the php 5.1+ TZ compatibility ini_set('error_reporting', 2047); ini_set('display_errors', 0); define('_LICENSE_KEY_', ''); require_once '../includes/sessions.inc.php'; require_once '../includes/sco_functions.inc.php'; require_once '../includes/classes/phemplate.class.php'; $output = array(); $tpl = new phemplate('skin/', 'remove_nonjs'); $tpl->set_file('content', 'step3.html'); $tplvars = array(); $tplvars['page_title'] = 'Etano Install Process'; $tplvars['css'] = 'step3.css'; $tplvars['page'] = 'step3'; $tpl->set_var('output', $output); $tpl->set_var('tplvars', $tplvars); $tpl->process('content', 'content'); include 'frame.php';
/****************************************************************************** Etano =============================================================================== File: admin/member_results.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require_once '../includes/common.inc.php'; require_once '../includes/admin_functions.inc.php'; allow_dept(DEPT_MODERATOR | DEPT_ADMIN); $tpl = new phemplate('skin/', 'remove_nonjs'); $output = array(); $sorts = array('a.`_user`', 'a.`score` DESC', 'a.`fk_user_id` DESC'); $sort_names = array('alphabetically', 'by score (highest first)', 'newest first'); $o = isset($_GET['o']) ? (int) $_GET['o'] : 0; $r = !empty($_GET['r']) ? (int) $_GET['r'] : current($accepted_results_per_page); $output['search_md5'] = sanitize_and_format_gpc($_GET, 'search', TYPE_STRING, $__field2format[FIELD_TEXTFIELD], ''); $sortby = isset($_GET['sortby']) && isset($sorts[(int) $_GET['sortby']]) ? (int) $_GET['sortby'] : 0; $output['sortby'] = vector2options($sort_names, $sortby); $input = array(); $user_ids = array(); $do_query = true; if (!empty($output['search_md5'])) { // if we have a query cache, retrieve all from cache $query = "SELECT `results`,`search` FROM `{$dbtable_prefix}site_searches` WHERE `search_md5`='" . $output['search_md5'] . "' AND `search_type`=" . SEARCH_USER; if (!($res = @mysql_query($query))) {
/****************************************************************************** Etano =============================================================================== File: home.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require 'includes/common.inc.php'; require _BASEPATH_ . '/includes/user_functions.inc.php'; require _BASEPATH_ . '/skins_site/' . get_my_skin() . '/lang/home.php'; check_login_member('auth'); $tpl = new phemplate(_BASEPATH_ . '/skins_site/' . get_my_skin() . '/', 'remove_nonjs'); $output = array(); $query = "SELECT `_photo` as `photo`,UNIX_TIMESTAMP(`date_added`) as `date_added` FROM `{$dbtable_prefix}user_profiles` WHERE `fk_user_id`='" . $_SESSION[_LICENSE_KEY_]['user']['user_id'] . "'"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } if (mysql_num_rows($res)) { $output = mysql_fetch_assoc($res); $output['date_added'] = strftime($_SESSION[_LICENSE_KEY_]['user']['prefs']['date_format'], $output['date_added'] + $_SESSION[_LICENSE_KEY_]['user']['prefs']['time_offset']); } if (empty($output['photo'])) { $output['photo'] = 'no_photo.gif'; } $query = "SELECT b.`m_name`,UNIX_TIMESTAMP(a.`paid_until`) as `paid_until` FROM `{$dbtable_prefix}payments` a,`{$dbtable_prefix}memberships` b WHERE a.`m_value_to`=b.`m_value` AND a.`fk_user_id`='" . $_SESSION[_LICENSE_KEY_]['user']['user_id'] . "' AND a.`paid_until`>'" . gmdate('Ymd') . "' AND a.`refunded`=0 AND a.`is_active`=1 ORDER BY a.`paid_until` DESC LIMIT 1"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR);
Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require_once '../includes/common.inc.php'; db_connect(_DBHOST_, _DBUSER_, _DBPASS_, _DBNAME_); require_once '../includes/admin_functions.inc.php'; require_once '../includes/classes/fileop.class.php'; require_once '../includes/classes/etano_package.class.php'; allow_dept(DEPT_ADMIN); set_time_limit(0); ignore_user_abort(true); $error = false; $tpl = new phemplate('skin/', 'remove_nonjs'); $output = array(); $fileop = new fileop(); $file = sanitize_and_format_gpc($_GET, 'f', TYPE_STRING, $__field2format[FIELD_TEXTFIELD] | FORMAT_RUDECODE, ''); if (substr($file, 0, 7) == 'http://') { // save it in tmp/packages and rename $file to filename.zip require_once '../includes/classes/package_downloader.class.php'; $p = new package_downloader($file); if ($p->download()) { $file = $p->file_name; } else { $file = ''; $error = true; $topass['message']['type'] = MESSAGE_ERROR; $topass['message']['text'] = $p->error_text; }
/****************************************************************************** Etano =============================================================================== File: admin/newsletter.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require_once '../includes/common.inc.php'; require_once '../includes/admin_functions.inc.php'; allow_dept(DEPT_ADMIN); $tpl = new phemplate('skin/', 'remove_nonjs'); $output = array(); if (isset($_SESSION['topass']['input'])) { $output = $_SESSION['topass']['input']; $output['return2'] = $output['return']; $output['return'] = rawurlencode($output['return']); } else { $output['return'] = sanitize_and_format_gpc($_REQUEST, 'return', TYPE_STRING, $__field2format[FIELD_TEXTFIELD], ''); $output['return2'] = rawurldecode($output['return']); } $tpl->set_file('content', 'newsletter.html'); $tpl->set_var('output', $output); $tpl->process('content', 'content'); $tplvars['title'] = 'Send Newsletter'; $tplvars['page'] = 'newsletter'; $tplvars['css'] = 'newsletter.css';
/****************************************************************************** Etano =============================================================================== File: admin/site_news.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require_once '../includes/common.inc.php'; require_once '../includes/admin_functions.inc.php'; allow_dept(DEPT_ADMIN); $tpl = new phemplate('skin/', 'remove_nonjs'); $o = isset($_GET['o']) ? (int) $_GET['o'] : 0; $r = isset($_GET['r']) ? (int) $_GET['r'] : current($accepted_results_per_page); $where = '1'; $from = "`{$dbtable_prefix}site_news`"; $query = "SELECT count(*) FROM {$from} WHERE {$where}"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } $totalrows = mysql_result($res, 0, 0); $loop = array(); if (!empty($totalrows)) { if ($o >= $totalrows) { $o = $totalrows - $r; $o = $o >= 0 ? $o : 0; }
/****************************************************************************** Etano =============================================================================== File: blog_search.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ //define('CACHE_LIMITER','private'); require 'includes/common.inc.php'; require _BASEPATH_ . '/includes/user_functions.inc.php'; require _BASEPATH_ . '/skins_site/' . get_my_skin() . '/lang/blogs.inc.php'; $tpl = new phemplate(_BASEPATH_ . '/skins_site/' . get_my_skin() . '/', 'remove_nonjs'); $output = array(); $o = isset($_GET['o']) ? (int) $_GET['o'] : 0; $r = !empty($_GET['r']) ? (int) $_GET['r'] : current($accepted_results_per_page); $output['search_md5'] = sanitize_and_format_gpc($_GET, 'search', TYPE_STRING, $__field2format[FIELD_TEXTFIELD], ''); $input = array(); $post_ids = array(); $error = false; if (!empty($output['search_md5'])) { // if we have a query cache, retrieve all from cache $query = "SELECT `results`,`search` FROM `{$dbtable_prefix}site_searches` WHERE `search_md5`='" . $output['search_md5'] . "' AND `search_type`=" . SEARCH_BLOG; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } if (mysql_num_rows($res)) { $post_ids = mysql_result($res, 0, 0);
/****************************************************************************** Etano =============================================================================== File: admin/site_news_addedit.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require_once '../includes/common.inc.php'; require_once '../includes/admin_functions.inc.php'; require_once '../includes/tables/site_news.inc.php'; allow_dept(DEPT_ADMIN); $tpl = new phemplate('skin/', 'remove_nonjs'); $output = $site_news_default['defaults']; if (isset($_SESSION['topass']['input'])) { $output = $_SESSION['topass']['input']; } elseif (!empty($_GET['news_id'])) { $news_id = (int) $_GET['news_id']; $query = "SELECT * FROM `{$dbtable_prefix}site_news` WHERE `news_id`='{$news_id}'"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } if (mysql_num_rows($res)) { $output = mysql_fetch_assoc($res); $output['news_title'] = sanitize_and_format($output['news_title'], TYPE_STRING, $__field2format[TEXT_DB2EDIT]); $output['news_body'] = sanitize_and_format($output['news_body'], TYPE_STRING, $__field2format[TEXT_DB2EDIT]); } }
<?php /****************************************************************************** Etano =============================================================================== File: admin/index.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require_once '../includes/common.inc.php'; if (!isset($_SESSION[_LICENSE_KEY_]['admin']['admin_id'])) { if (!empty($_SESSION['topass'])) { $topass = $_SESSION['topass']; $_SESSION['topass'] = array(); } $message = isset($topass['message']) ? $topass['message'] : ''; $tpl = new phemplate('skin/', 'remove_nonjs'); $tpl->set_file('frame', 'index.html'); $tpl->set_var('title', 'Admin panel login'); $tpl->set_var('baseurl', _BASEURL_); $tpl->set_var('message', $message); $tpl->set_var('tplvars', $tplvars); echo $tpl->process('', 'frame', TPL_FINISH); } else { redirect2page('admin/cpanel.php'); }
Etano =============================================================================== File: profile.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ //define('CACHE_LIMITER','private'); require_once 'includes/common.inc.php'; require_once 'includes/user_functions.inc.php'; require_once 'includes/network_functions.inc.php'; check_login_member('profile_view'); $tpl = new phemplate(_BASEPATH_ . '/skins_site/' . get_my_skin() . '/', 'remove_nonjs'); $uid = 0; if (!empty($_GET['uid'])) { $uid = (string) (int) $_GET['uid']; } elseif (isset($_GET['user'])) { $user = sanitize_and_format($_GET['user'], TYPE_STRING, $__field2format[FIELD_TEXTFIELD]); $uid = get_userid_by_user($user); } elseif (!empty($_SESSION[_LICENSE_KEY_]['user']['user_id'])) { $uid = (string) $_SESSION[_LICENSE_KEY_]['user']['user_id']; } else { redirect2page('index.php'); } if (!empty($_SESSION[_LICENSE_KEY_]['user']['user_id']) && $_SESSION[_LICENSE_KEY_]['user']['user_id'] == $uid) { redirect2page('my_profile.php'); } $output = array();
/****************************************************************************** Etano =============================================================================== File: admin/stats.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require_once '../includes/common.inc.php'; require_once '../includes/admin_functions.inc.php'; allow_dept(DEPT_ADMIN | DEPT_MODERATOR); $tpl = new phemplate('skin/', 'remove_nonjs'); $output = array(); $query = "SELECT count(*) FROM `{$dbtable_prefix}user_profiles`"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } $output['num_members'] = mysql_result($res, 0, 0); $query = "SELECT count(*) FROM `{$dbtable_prefix}user_photos`"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } $output['num_photos'] = mysql_result($res, 0, 0); $query = "SELECT count(*) FROM `{$dbtable_prefix}user_blogs`"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); }
/****************************************************************************** Etano =============================================================================== File: admin/site_skins_addedit.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require_once '../includes/common.inc.php'; require_once '../includes/admin_functions.inc.php'; require_once '../includes/tables/site_skins.inc.php'; allow_dept(DEPT_ADMIN); $tpl = new phemplate('skin/', 'remove_nonjs'); $site_skins = $site_skins_default['defaults']; if (isset($_SESSION['topass']['input'])) { $site_skins = $_SESSION['topass']['input']; } elseif (!empty($_GET['module_code'])) { $module_code = sanitize_and_format($_GET['module_code'], TYPE_STRING, $__field2format[FIELD_TEXTFIELD]); $site_skins = get_site_option(array(), $module_code); $site_skins = sanitize_and_format($site_skins, TYPE_STRING, $__field2format[TEXT_DB2EDIT]); $site_skins['fk_module_code'] = $module_code; } $site_skins['fk_locale_id'] = dbtable2options("`{$dbtable_prefix}locales`", '`locale_id`', '`locale_name`', '`locale_name`', $site_skins['fk_locale_id']); $tpl->set_file('content', 'site_skins_addedit.html'); $tpl->set_var('site_skins', $site_skins); $tpl->process('content', 'content'); $tplvars['title'] = 'Site Skins'; $tplvars['page'] = 'site_skins_addedit';
<?php /****************************************************************************** Etano =============================================================================== File: login.php $Revision$ Software by: DateMill (http://www.datemill.com) Copyright by: DateMill (http://www.datemill.com) Support at: http://www.datemill.com/forum ******************************************************************************* * See the "docs/licenses/etano.txt" file for license. * ******************************************************************************/ require 'includes/common.inc.php'; require _BASEPATH_ . '/includes/user_functions.inc.php'; require _BASEPATH_ . '/skins_site/' . get_my_skin() . '/lang/login.inc.php'; $tpl = new phemplate(_BASEPATH_ . '/skins_site/' . get_my_skin() . '/', 'remove_nonjs'); $tpl->set_file('content', 'login.html'); $tpl->process('content', 'content'); $tplvars['title'] = $GLOBALS['_lang'][236]; $tplvars['page_title'] = $GLOBALS['_lang'][237]; $tplvars['page'] = 'login'; $tplvars['css'] = 'login.css'; $no_timeout = true; include 'frame.php';