Пример #1
0
 public function __construct()
 {
     $this->folder = functions::q($_POST['id']);
     $this->act = functions::q($_POST['op']);
     $this->db = new DataBase();
     $this->f = new functions();
     $this->image = new SimpleImage();
     if ($this->act == 'upload') {
         $name = $_FILES['uploadfile']['name'];
         $exp = explode('.', $name);
         $this->ext = $exp[count($exp) - 1];
         $filetypes = array('jpg', 'gif', 'bmp', 'png', 'JPG', 'BMP', 'GIF', 'PNG', 'jpeg', 'JPEG');
         if (!in_array($this->ext, $filetypes)) {
             die("wrong_format");
         } else {
             $this->photoName();
             if ($this->getNum() < $this->_count) {
                 $this->uploadFile();
             } else {
                 die("Максимальное количество загружаемых фотографий в объявление не должно превышать 6 шт.");
             }
         }
     } elseif ($this->act == 'delete') {
         $this->delete();
     }
 }
Пример #2
0
 function __construct($params)
 {
     $file = 'console-' . date(@$params['log'] ?: 'Y-m-d') . '.log';
     $this->_file = \loader::get_temp($file);
     $this->_uid = substr(\functions::hash(microtime(true)), -5);
     $this->_head();
 }
Пример #3
0
 function run()
 {
     /**@var tf_sat $sat */
     $sat = core::module('sat');
     $site = $sat->get_current_site();
     $json_file = loader::get_public('assets/' . $site->domain . '.json');
     $last_mod = @filemtime($json_file);
     $tree_last_mod = 0;
     if ($last_mod) {
         $last_node = $sat->get_node_handle()->set_where('site_id = %d', $sat->get_current_site_id())->set_order('updated_at DESC')->load_first();
         $tree_last_mod = $last_node ? $last_node->updated_at : 0;
         core::dprint(__METHOD__ . ': cached');
         // uptodate
         if ($tree_last_mod <= $last_mod) {
             $this->renderer->set_ajax_answer(file_get_contents($json_file))->ajax_flush();
             return;
         }
     }
     core::dprint(__METHOD__ . ': fetch!');
     $tree = $sat->get_current_site_tree();
     $allowedKeys = array('title', 'url');
     array_walk($tree, function (&$v) use($allowedKeys) {
         $v = array_intersect_key($v, array_flip($allowedKeys));
     });
     $tree = array_values($tree);
     // cache
     file_put_contents($json_file, functions::json_encode($tree));
     $this->renderer->set_ajax_answer($tree)->ajax_flush();
 }
Пример #4
0
 /**
  * Run block
  * Called from module::run_block
  * 
  * Params passed to 'block.data' 
  * action converted to object!
  * 
  * Extended params passed to {$block.params}
  * 
  * @throws modules_exception
  */
 function run($action, $params)
 {
     $_tag = $this->get_context()->get_tag();
     core::dprint('[BLOCK] start ' . $_tag . '::' . $action, core::E_DEBUG);
     $return = false;
     // @todo check for callable
     if (is_callable(array($this, $action))) {
         if (!empty($params)) {
             // convert parameters to object
             $c_params = functions::array2object($params);
             $data = call_user_func(array($this, $action), $c_params);
         } else {
             $data = call_user_func(array($this, $action));
         }
         // get block builtin properties
         $props = $this->get_block($action);
         // assign params
         $props['params'] = $params;
         $return = $this->get_context()->get_core()->lib('renderer')->render_block($props, $data);
     } else {
         throw new modules_exception('Not callable action supplied - ' . $action);
     }
     core::dprint('[/BLOCK] end ' . $_tag . '::' . $action, core::E_DEBUG);
     return $return;
 }
Пример #5
0
 function run()
 {
     $q = $this->get_param('query');
     if (empty($q)) {
         $q = functions::request_var('keyword');
     }
     if (loader::in_ajax()) {
         $keyword = trim($q);
     } else {
         $keyword = trim(urldecode($q));
     }
     $this->renderer->set_return('keyword', $keyword);
     $this->renderer->set_main_title('search');
     if (empty($q)) {
         return;
     }
     if (strings::strlen($keyword) < 3) {
         $this->renderer->set_message('sat.search_too_short', array('result' => false));
         $this->renderer->set_ajax_message('sat.search_too_short');
         return false;
     }
     // make search and redirect to it
     $id = $this->make_search($keyword);
     // redirect to search results
     $url = $this->_controller->get_context()->get_router()->make_url('/search/' . $id . '/');
     if (loader::in_ajax()) {
         $this->_controller->set_null_template();
         $this->renderer->set_ajax_message($this->_found ? sprintf('По вашему запросу найдено %d записей', $this->_found) : 'Подходящих записей не найдено')->set_ajax_result($this->_found)->set_ajax_redirect($url);
     } else {
         functions::redirect($url);
         core::get_instance()->halt();
     }
 }
Пример #6
0
 function action_system()
 {
     $this->collection->toggle_system($this->params->id, 'true' == functions::request_var('to', 'false'));
     if ($this->in_ajax()) {
         $this->_ajax_answer(true, i18n::T('Status changed'));
     }
 }
Пример #7
0
 function __construct($dependencies = null, $context)
 {
     if (empty($dependencies)) {
         return;
     }
     $this->context = $context;
     $this->dependencies = is_array($this->dependencies) ? functions::array_merge_recursive_distinct($dependencies, $this->dependencies) : $dependencies;
 }
Пример #8
0
 public function __construct()
 {
     parent::__construct();
     //necessary
     functions::accountExpiration();
     $this->playlist_model = new Playlist_Model();
     $this->layout_model = new Layout_Model();
 }
Пример #9
0
function Indicadores($tematica_id)
{
    if ($tematica_id > 0) {
        return functions::indicadores($tematica_id);
    } else {
        // todos los indicadores de observatic
        return functions::indicador();
    }
}
Пример #10
0
 /**
  * Remember!
  * Assign current item in controller for comment linking!
  */
 function run()
 {
     if (loader::in_ajax() !== true) {
         throw new controller_exception('Cant touch this ' . __METHOD__);
         return false;
     }
     core::dprint('run comment modify');
     $pctl = core::modules()->get_router()->get_controller();
     $user = core::lib('auth')->get_user();
     /**
      * Parent item, must be assigned thru @see module_controller::set_current_item()
      * @var abs_collection_item
      */
     $post = $pctl->get_current_item();
     // var_dump(get_class($post), core::get_modules()->get_router()->get_name());
     if (!$post) {
         throw new controller_exception('No item assigned');
     }
     if (!$post->has_behavior('sat.commentable')) {
         throw new controller_exception('Not commentable');
     }
     $comments = $post->behavior('sat.commentable')->get_attach_model();
     //get_comments();
     $request = core::lib('request');
     $renderer = core::lib('renderer');
     $user_id = core::lib('auth')->get_user()->id;
     $pid = (int) $request->post('pid', 0);
     $limit = core::selfie()->cfg('comment_interval', 60);
     $auth = core::lib('auth');
     /** @var aregistry $sd */
     $sd = $auth->get_current_session()->get_storage();
     $time = $sd->comments_last_time;
     //$time = $comments->get_last_time($pid, $user_id);
     // disallow by interval
     if ($time && $time + $limit > time()) {
         $pctl->set_null_template();
         $renderer->set_ajax_answer(array('status' => false, 'id' => 0, 'message' => vsprintf(i18n::T('sat\\comment_interval_restriction'), $time + $limit - time())))->ajax_flush();
         // else core::get_instance()->set_message(array('content', 'comment_interval_restriction'));
         return;
         // exit
     }
     $sd->comments_last_time = time();
     $username = functions::request_var('username', '');
     $text = functions::request_var('text', '');
     $api = functions::request_var('api');
     $id = $comments->modify(array('user_ip' => core::lib('auth')->get_user_ip(true), 'user_id' => $user_id, 'ctype_id' => $post->get_ctype_id(), 'username' => $username, 'pid' => $pid, 'text' => $text, 'type' => functions::request_var('type', 0), 'tpid' => functions::request_var('tpid', 0), 'api' => $api));
     $comment = $comments->get_item_by_id($id);
     if (!$comment) {
         throw new controller_exception('[ajax] Comment create failed');
     }
     $comment->load_secondary();
     $renderer->set_data('comment', $comment->render())->set_ajax_answer(array('status' => true, 'id' => $id))->set_ajax_message(i18n::T('sat\\comment_posted'));
     //->set_main_template('content/comment/view');
     $renderer->ajax_flush('shared/comments/comment');
     // alright, update counter
     return $id;
 }
Пример #11
0
function applyStatus($id, $act)
{
    if ($act == 'top') {
        $sql = "UPDATE board SET top_time='" . (14 * 86400 + time()) . "' WHERE id='{$id}'";
    } elseif ($act == 'color') {
        $sql = "UPDATE board SET is_color='1' WHERE id='" . functions::q($id) . "'";
    } elseif ($act == 'important') {
        $sql = "UPDATE board SET is_important='1' WHERE id='" . functions::q($id) . "'";
    }
    return mysql_query($sql);
}
Пример #12
0
 /**
  * Init config 
  */
 function init_config($config = array(), $append = false)
 {
     if (empty($config)) {
         return;
     }
     if (!$append) {
         $this->config = $config;
     } else {
         $this->config = functions::array_merge_recursive_distinct($this->config, $config);
     }
 }
Пример #13
0
 function getPhoto($name, $width, $height, $params = "", $method = "echo")
 {
     $url = HOME . substr($name, 2);
     $size = functions::getFullSize(DIR . substr($name, 2), $width, $height);
     $width = $size['width'];
     $height = $size['height'];
     $txt = "<img src=\"" . $url . "\" width=" . $width . " height=" . $height . " " . $params . "/>";
     if ($method == "return") {
         return $txt;
     } else {
         echo $txt;
     }
 }
Пример #14
0
 public function init()
 {
     // Make a controller copy of $user since it won't report anything back
     $user = $this->user;
     $this->passChanged = isset($_GET['passchanged']) ? $_GET['passchanged'] : false;
     // Is this user allowed here
     if (!$user->isSigned() and !isset($_GET['c']) and !$this->passChanged) {
         //Redirect
         functions::_index();
     }
     if ($user->isSigned() and $this->passChanged || isset($_GET['c'])) {
         $this->_redirect("http://" . $_SERVER['HTTP_HOST'] . "/user/profile");
     }
     //Proccess Password change
     if (count($_POST)) {
         // Set some session variables
         $pass = array();
         $_SESSION['pass'] = $pass;
         $_SESSION['pass']['Password'] = $_POST['password'];
         $_SESSION['pass']['Password2'] = $_POST['password2'];
         $_SESSION['hash'] = $_POST['c'];
         // Ensures session is written before redirect.
         session_write_close();
         if ($_SESSION['hash']) {
             $this->_redirect("http://" . $_SERVER['HTTP_HOST'] . "/user/changepassword?c=" . $_SESSION['hash']);
         } else {
             $this->_redirect("http://" . $_SERVER['HTTP_HOST'] . "/user/changepassword");
         }
     } else {
         if (isset($_SESSION['pass'])) {
             $hash = $_SESSION['hash'];
             $pass = $_SESSION['pass'];
             if (!$user->isSigned() and $hash) {
                 //Change Password with confirmation hash
                 $user->newPassword($hash, $pass);
             } else {
                 //Change the Password of signed in user without a confirmation hash
                 $user->update($pass);
             }
             // If password was changed
             if (!count($user->log->getFormErrors())) {
                 session_unset();
                 session_destroy();
                 // Log the user out
                 $user->logout();
                 $this->_redirect("http://" . $_SERVER['HTTP_HOST'] . "/user/changepassword?passchanged=1");
             }
         }
     }
 }
Пример #15
0
 /**
  * render|update|create model model ...
  * @param InputInterface $input
  * @param OutputInterface $output
  * @return int|null|void
  * @throws \tf_exception
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     //require('../_tests/loader.php');
     $core = $this->core();
     $this->prepare_db($input->getOption('database'));
     $action = $input->getArgument('action');
     if (empty($action)) {
         throw new \tf_exception("empty action\n");
     }
     $ids = $input->getArgument('models');
     if (empty($ids)) {
         throw new \tf_exception("empty ID\n");
     }
     if ($ids[0] == '*') {
         $ids = Helpers\ModelEnumerator::find();
     }
     /*
      * $action = @$_SERVER['argv'][2] ? : 'render';
        if (in_array('--', $_SERVER['argv'])) {
        }
     */
     $output->writeln('action: ' . $action);
     /** @var collection_generator */
     $generator = \abs_collection::get_generator();
     foreach ($ids as $mid) {
         $_mid = explode('.', trim($mid));
         if (count($_mid) == 1) {
             array_unshift($_mid, 'core');
             $container = core::selfie();
         } else {
             $container = core::module($_mid[0]);
         }
         if (!$container) {
             $output->writeln('skip ' . $mid);
             continue;
         }
         $method = 'get_' . $_mid[1] . '_handle';
         // allow model with params: get_model_handle | model('model')
         $obj = \functions::is_callable(array($container, $method)) ? $container->{$method}() : $container->model($_mid[1]);
         $generator->append_object($obj);
     }
     $output->writeln($generator->render_table_structure(), OutputInterface::OUTPUT_RAW);
     if ($action == 'update') {
         $generator->update_table_structure();
     }
     if ($action == 'create') {
         $generator->update_table_structure(true);
     }
 }
Пример #16
0
function get_top($order = 'postforum')
{
    $req = mysql_query("SELECT * FROM `users` WHERE `{$order}` > 0 ORDER BY `{$order}` DESC LIMIT 9");
    if (mysql_num_rows($req)) {
        $out = '';
        while ($res = mysql_fetch_assoc($req)) {
            $out .= $i % 2 ? '<div class="list2">' : '<div class="list1">';
            $out .= functions::display_user($res, array('header' => '<b>' . $res[$order] . '</b>')) . '</div>';
            ++$i;
        }
        return $out;
    } else {
        return '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>';
    }
}
Пример #17
0
 function run()
 {
     $name = functions::request_var('template', '');
     $name = $name ? $name : 'default';
     if (empty($name) || !preg_match('@^[a-z\\d]+$@i', $name)) {
         throw new controller_exception('Bad id');
     }
     $domain = preg_replace('@^www\\.@', '', $_SERVER['HTTP_HOST']);
     $vars = $this->request->post();
     $to = $vars['email'];
     /** @var tf_mailer */
     $mailer = core::lib('mailer');
     $result = $mailer->email_template($name, $to, $vars, true);
     $this->renderer->set_ajax_result($result)->set_ajax_message('ok')->ajax_flush();
     return;
 }
Пример #18
0
 public function __construct()
 {
     parent::__construct();
     //necessary
     //Auth
     if (!$this->auth->logged_in('login')) {
         $this->session->set_flash('login_message', 'Please login to continue');
         $this->session->set('referer', url::current());
         url::redirect('users/login');
     }
     functions::accountExpiration();
     $this->playlist_model = new Playlist_Model();
     $this->layout_model = new Layout_Model();
     $this->dstemplate_model = new Dstemplate_Model();
     $this->template->title = 'Layout';
 }
Пример #19
0
 public static function nextDepartureFromRuddammen($maxNumber = 3)
 {
     $times = array();
     $url = "https://api.resrobot.se/departureBoard.json?" . "maxJourneys=5" . "&passlist=0" . "&id=" . self::$ruddammen_locationid . "&key=" . self::$norditas_api_nyckel_stolptidtabeller;
     $json = functions::acurl($url);
     $djson = json_decode($json, 1);
     if (is_array($djson) && isset($djson["Departure"])) {
         $darray = $djson["Departure"];
         foreach ($darray as $array) {
             if (strtotime($array["time"]) >= time()) {
                 $times[] = preg_replace("/:\\d\\d\$/", "", $array["time"]);
             }
         }
     }
     return array_slice($times, 0, $maxNumber);
 }
Пример #20
0
 static function auth($login, $password)
 {
     $login = functions::check($login);
     $password = functions::check($password);
     $error = "";
     if (!empty($login) && !empty($password)) {
         $user = users::getUser(1, $login, $password);
         if ($user->id > 0) {
             $_SESSION["s_user"] = $user->toArray();
         } else {
             $error = "Вы ввели не верные логин или пароль";
         }
     } else {
         $error = "Необходимо заполнить все поля";
     }
     return $error;
 }
Пример #21
0
 function action_edit_after($_item)
 {
     if ($this->params->do == 'change_title') {
         $_item->title = functions::request_var('title');
         $_item->update_fields('title');
         if ($this->in_ajax()) {
             $this->ajax_answer(true);
         }
     }
     if ($this->params->do == 'change_url') {
         $_item->title = functions::request_var('url');
         $_item->update_fields('url');
         if ($this->in_ajax()) {
             $this->ajax_answer(true);
         }
     }
 }
Пример #22
0
 public function getAll($sql, $pageCondition = false)
 {
     if (is_array($pageCondition)) {
         $pageCondition['page'] = ($page = functions::uint($pageCondition['page'])) ? $page : 1;
         $pageCondition['pagesize'] = ($pagesize = functions::uint($pageCondition['pagesize'])) ? $pagesize : 20;
         $resource = odb::db()->getAll($sql);
         $rows = count($resource);
         $pageInfo = functions::pageInfo($rows, $pageCondition['pagesize'], $pageCondition['page']);
     }
     $startRow = ($pageCondition['page'] - 1) * $pageCondition['pagesize'];
     $sql = is_array($pageCondition) ? $sql . " LIMIT {$startRow}, {$pageCondition['pagesize']}" : $sql;
     $list = odb::db()->getAll($sql, MYSQL_ASSOC);
     if (is_array($pageCondition)) {
         $response = array('list' => $list, 'pageInfo' => $pageInfo);
         return $response;
     }
     return $list;
 }
Пример #23
0
 $adrfile = mysql_fetch_array($file1);
 if ($file1 == 0 || !is_file("{$adrfile['adres']}/{$adrfile['name']}")) {
     echo functions::display_error($lng_dl['file_select_error'], '<a href="index.php">' . $lng['back'] . '</a>');
     require_once '../incfiles/end.php';
     exit;
 }
 if (isset($_POST['submit'])) {
     $scrname = $_FILES['screens']['name'];
     $scrsize = $_FILES['screens']['size'];
     $scsize = GetImageSize($_FILES['screens']['tmp_name']);
     $scwidth = $scsize[0];
     $scheight = $scsize[1];
     $ffot = strtolower($scrname);
     $dopras = array("gif", "jpg", "png");
     if ($scrname != "") {
         $formfot = functions::format($ffot);
         if (!in_array($formfot, $dopras)) {
             echo $lng_dl['screenshot_upload_error'] . '<br/><a href="index.php?act=screen&amp;file=' . $file . '">' . $lng['repeat'] . '</a><br/>';
             require_once '../incfiles/end.php';
             exit;
         }
         if ($scwidth > 320 || $scheight > 320) {
             echo $lng_dl['screenshot_size_error'] . '<br/><a href="index.php?act=screen&amp;file=' . $file . '">' . $lng['repeat'] . '</a><br/>';
             require_once '../incfiles/end.php';
             exit;
         }
         if (preg_match("/[^\\da-z_\\-.]+/", $scrname)) {
             echo $lng_dl['screenshot_name_error'] . "<br/><a href='?act=screen&amp;file=" . $file . "'>" . $lng['repeat'] . "</a><br/>";
             require_once '../incfiles/end.php';
             exit;
         }
Пример #24
0
* /modules/users/money/sms_vip.php?user_id=71111111111&num=1121&msg=admin
* &skey=807140ca5ba73a2455029e952beae13a&operator_id=299&date=2008-10-23+17%3A01%3A50&smsid=1379554447&msg_trans=admin&operator=operator&test=1
*/
require '../../../modules/core/loader.php';
ini_set('dispaly_errors', 'off');
$core = core::get_instance();
$core->lib('logger')->log('SMS Payment', print_r($_GET, 1));
$smskey = $core->get_cfg_var('sms_seckey', '');
core::lib('renderer')->set_content_type('text/plain');
$smsid = functions::request_var('smsid', '');
$num = functions::request_var('num', '');
$operator = functions::request_var('operator', '');
$userid = functions::request_var('user_id', '');
$cost = functions::request_var('cost', '');
$msg = functions::request_var('msg', '');
$skey = functions::request_var('skey', '');
list($prefix, $msg) = explode(' ', $msg);
if ($skey != md5($smskey)) {
    header("HTTP/1.0 404 Not Found");
    echo "Error! invalid sek key";
    die;
}
$user = trim($msg);
$user = core::module('users')->get_user($user, 'login');
if ($user->is_anonymous()) {
    header("HTTP/1.0 404 Not Found");
    echo "Error! invalid login";
    die;
}
echo "smsid:{$smsid}\n";
echo "status:reply\n";
Пример #25
0
    -----------------------------------------------------------------
    Параметры комментариев
    -----------------------------------------------------------------
    */
    $arg = array('comments_table' => 'cms_album_comments', 'object_table' => 'cms_album_files', 'script' => 'album.php?act=comments', 'sub_id_name' => 'img', 'sub_id' => $img, 'owner' => $owner['id'], 'owner_delete' => true, 'owner_reply' => true, 'owner_edit' => false, 'title' => $lng['comments'], 'context_top' => $context_top, 'context_bottom' => '');
    /*
    -----------------------------------------------------------------
    Ставим метку прочтения
    -----------------------------------------------------------------
    */
    if (core::$user_id == $user['id'] && $res_obj['unread_comments']) {
        mysql_query("UPDATE `cms_album_files` SET `unread_comments` = '0' WHERE `id` = '{$img}' LIMIT 1");
    }
    /*
    -----------------------------------------------------------------
    Показываем комментарии
    -----------------------------------------------------------------
    */
    require '../incfiles/head.php';
    $comm = new comments($arg);
    /*
    -----------------------------------------------------------------
    Обрабатываем метки непрочитанных комментариев
    -----------------------------------------------------------------
    */
    if ($comm->added && core::$user_id != $owner['id']) {
        mysql_query("UPDATE `cms_album_files` SET `unread_comments` = '1' WHERE `id` = '{$img}' LIMIT 1");
    }
} else {
    echo functions::display_error($lng['error_wrong_data']);
}
Пример #26
0
if (!defined('IN_MAIN')) {
    die('hax0rs alert!');
}
//  Узнаем глобальные параметры
$cmd_op = core::get_params()->op;
$cmd_id = core::get_params()->id;
require "_req.php";
// был сабмит
$is_submited = isset($_POST["item_submit"]);
// Заголовок станицы
core::lib('renderer')->set_page_title('pages');
// class name (handler)
$cdata = $this->class_register('mw_' . basename(__FILE__, loader::DOT_PHP), array('no_preload' => true), true);
// toggle delete
if ($cmd_op == 'active') {
    $cdata->toggle_active($cmd_id, 'true' == functions::request_var('to', 'false'));
    if (loader::in_ajax()) {
        return;
    }
}
// single item load hack
if ($cmd_op == 'edit' || $cmd_op == 'drop' || $cmd_op == 'update' || $is_submited) {
    /*
    // simple loading (without extra data) if we continue with listing
    if ($is_submited)
        $cdata->set_cfg_var('simple', true); 
    */
    if (!empty($cmd_id)) {
        $cdata->set_cfg_var('load_only_id', $cmd_id);
    }
    // load data
Пример #27
0
 private static function outputSignatureForm($userdata)
 {
     if (empty($userdata)) {
         return "";
     }
     $stdout = "";
     $baseurl = str_replace("/index.php", "", $_SERVER["PHP_SELF"]);
     // ------------------------------
     $stdout .= functions::OutputWikiPage('0', '2456');
     /*
         $stdout =
           "          <div class='col-content-left'>\r\n" .
           "\r\n" .
           "            <ul class='tightlist'>\r\n" .
           "              <li class='bottommargin'><a href='".$_SERVER["PHP_SELF"]."#create'><strong>Create Your Own Nordita E-Mail Signature</strong></a></li>\r\n" .
           "              <li class='bottommargin'><a href='".$_SERVER["PHP_SELF"]."#non-nordita'><strong>Non-Nordita E-Mail Signatures</strong></a></li>\r\n" .
           "              <li class='bottommargin'><a href='".$_SERVER["PHP_SELF"]."#about'><strong>What is an E-Mail Signature?</strong></a></li>\r\n" .
           //"              <li class='bottommargin'><a href='http://intra.kth.se/en/it/support/guider/e-post/mall-med-signaturer-in-i-outlook-1.281533'><strong>KTH-Branded Signatures for Outlook 2010 in Windows 7".EXTERNAL_LINK."</strong></a></li>\r\n" .
           "            </ul>\r\n" .
           "\r\n" .
           "          </div> <div class='col-content-right'>\r\n" .
           "\r\n" .
           "            <ul class='tightlist'>\r\n" .
           "              <li>\r\n" .
           "                <p><a href='".$baseurl."/settings/index.php'><strong>Instructions on How to Add a Signature <span class='nowrap'>to Different E-Mail Programs and Webmail Services:</span></strong></a></p>\r\n" .
           "              </li>\r\n" .
           "            </ul>\r\n" .
           "            <p>" .
           "<a href='".$baseurl."/settings/alpine/index.php' title='Apline'><img src='img/_wiki/icon_alpine_75x75.png' alt='' style='width:45px;height:45px;padding-right:0.5em'></a>" .
           "<a href='".$baseurl."/settings/applemail/index.php' title='Apple Mail'><img src='img/_wiki/icon_applemail_75x75.png' alt='' style='width:45px;height:45px;padding-right:0.5em'></a>" .
           " &nbsp; " .
           "<a href='".$baseurl."/settings/webmail_gmail/index.php' title='Gmail'><img src='img/_wiki/icon_gmail_75x75.png' alt='' style='width:45px;height:45px;padding-right:0.5em'></a>" .
           " &nbsp; " .
           "<a href='".$baseurl."/settings/webmail_kth/index.php' title='KTH Webmail'><img src='img/_wiki/icon_webmail_kth_75x75.png' alt='' style='width:45px;height:45px;padding-right:0.5em'></a>" .
           " &nbsp; " .
           "<a href='".$baseurl."/settings/outlook/index.php' title='Outlook'><img src='img/_wiki/icon_outlook2010_75x75.png' alt='' style='width:45px;height:45px;padding-right:0.5em'></a>" .
           " &nbsp; " .
           "<a href='".$baseurl."/settings/thunderbird/index.php' title='Thunderbird'><img src='img/_wiki/icon_thunderbird_75x75.png' alt='' style='width:45px;height:45px'></a>" .
           "</p>\r\n" .
           "\r\n" .
           "          </div><div style='clear:both'><br></div>\r\n" .
           "\r\n";
     
         // ------------------------------
     
         $stdout .=
           "          <hr id='create' style='margin:0 0 2em 0'>\r\n\r\n";
     
         $stdout .=
           "          <h3 class='bottommargin'>Create your own Nordita e-mail signature</h3>\r\n" .
           "\r\n" .
           "          <div class='col-content-left'>\r\n" .
           "\r\n" .
           "            <ol class='tightlist'>\r\n" .
           "              <li class='bottommargin'>Click on <a href='".$GLOBALS["documentClass"]->getPagePath()."/index.php#maildb_doorlabel' rel='nofollow'><strong>your linked name in the list below</strong></a></li>\r\n" .
           "              <li class='bottommargin'>You will be taken to a web page which lists <strong>several suggestions for a signature with your name and other data prefilled</strong>. They all contain the required elements but vary with extra information you may or may not want to use. There are sections for <a href='".$_SERVER["PHP_SELF"]."#about'><strong>plain text signatures (recommended) and HTML formatted signatures</strong></a>.</li>\r\n" .
           "              <li class='bottommargin'><strong>Follow the instructions</strong> to incorporate the signature in the settings of your e-mail program or webmail. <a href='".$baseurl."/settings/index.php'><strong>The details depend of course on what program you are using</strong></a>. Ask Hans Mühlen if you have problems.</p>\r\n" .
     
           "            </ol>\r\n" .
           "\r\n" .
           "          </div><div class='col-content-right'>\r\n" .
           "\r\n" .
           "            <p style='margin-bottom:-0.5em'>Two signatures, one <strong>plain text</strong>, the other <strong>HTML formatted</strong>:</p>\r\n" .
           "            <p style='margin-bottom:-1em'><img src='".PATH_IMG."/_wiki/signature_two_samples.png' alt=''></p>\r\n".
           "\r\n" .
           "          </div><div style='clear:both'><br></div>\r\n" .
           "\r\n";
     */
     // ------------------------------
     $stdout .= "\r\n" . "          <div id='maildb_doorlabel'>\r\n" . "\r\n";
     $nr = ceil(count($userdata) / 4);
     $i = 0;
     $stdout .= "              <table style='width:100%;border-top:1px dotted #999;padding-top:1em;'>\r\n" . "                <tr>\r\n" . "                  <td>\r\n";
     foreach ($userdata as $user => $m) {
         if (isset($m["nw_fullname"])) {
             $i++;
             $stdout .= "                    <p><a href='" . $_SERVER["PHP_SELF"] . "?usr="******"'" . ">" . $m["nw_fullname"] . "</a></p>\r\n";
             if ($i % $nr == 0) {
                 $stdout .= "                  </td>\r\n                  <td>\r\n";
             }
         }
     }
     $stdout .= "                  </td>\r\n" . "                </tr>\r\n" . "              </table>\r\n" . "          </div>\r\n" . "\r\n";
     // ------------------------------
     $stdout .= PAGE_BREAK . functions::OutputWikiPage('0', '2457');
     /*
         $stdout .=
           "          <hr id='non-nordita' style='margin:2em 0 2em 0'>\r\n\r\n";
     
         $stdout .=
           "          <h3 class='bottommargin'>Non-Nordita e-mail signatures</h3>\r\n" .
           "\r\n" .
           "          <div class='col-content-left'>\r\n" .
           "\r\n" .
           "              <p><strong>In exceptional cases</strong>, mainly of an administrative nature, you might consider it to be advantageous to hide your affiliation with Nordita and instead use the fact that Nordita is owned by two well-known Swedish universities, KTH Royal Institute of Technology and Stockholm University. For these situations <strong>you might want to define alternative signatures</strong> in you e-mail program designed according to the rules of either of these universities.</p>\r\n" .
           "            <p>Both universities have their own <strong>strict rules on how their university e-mail singatures should look</strong>, and they also offer <strong>signature templates</strong> that can be incorporated into e-mail programs.</p>\r\n" .
           "\r\n" .
           "          </div><div class='col-content-right'>\r\n" .
           "\r\n" .
           "            <p style='margin-bottom:-1em'><strong>KTH Royal Institute of Technology</strong></p>\r\n" .
           "            <ul class='tightlist'>\r\n" .
           //"              <li><a href='http://intra.kth.se/en/it/support/guider/e-post/mall-med-signaturer-in-i-outlook-1.281533'>Signature templates for Outlook 2010 in Windows 7</a></li>\r\n" .
           "              <li><a href='http://intra.kth.se/en/regelverk/policyer/grafisk-profil/kth-s-grafiska-profil-1.25381'><strong>KTH Graphical Profile</strong></a></li>\r\n" .
           "              <li><a href='http://intra.kth.se/en/regelverk/policyer/grafisk-profil/mallar/signatur/anvisning-for-att-importera-mallar-med-signaturer-in-i-outlook-1.34293'>Guidelines for E-Mail Signatures <br>and signature templates for Outlook 2010 in Windows 7</a></li>\r\n" .
           "            </ul>\r\n" .
           "            <p style='margin-bottom:-1em'><strong>Stockholm University</strong></p>\r\n" .
           "            <ul class='tightlist'>\r\n" .
           "              <li><a href='http://www.su.se/english/staff-info/visual-identity'><strong>SU Graphical Profile</strong></a></li>\r\n" .
           "              <li><a href='http://www.su.se/medarbetare/visuellidentitet/mallar/e-postsignatur'>Guidelines for E-Mail Signatures</a> (in Swedish)</li>\r\n" .
     
           "              <li><a href='http://www.su.se/medarbetare/visuellidentitet/mallar/e-postsignatur/signaturer-i-e-postmeddelanden-1.38619'>Signature instructions for various e-mail programs</a></li>\r\n" .
     
           "            </ul>\r\n" .
           "\r\n" .
           "          </div><div style='clear:both'><br></div>\r\n\r\n";
     
         // ------------------------------
     
         $stdout .=
           "          <hr id='about' style='margin:2em 0 2em 0'>\r\n\r\n";
     
         $stdout .=
           "          <div class='col-content-left'>\r\n" .
           "\r\n" .
           "            <h3>E-mail signatures</h3>\r\n" .
           "            <p>When you write an e-mail message you probably sign it with some greeting, your name, perhaps your title and affiliation, phone number or whatever else is required by the situation. If you write many mails every day, rewriting this text every time gets a bit tedious.</p>\r\n" .
           "            <p>Fortunately, many e-mail programs or webmail services allow you to store a greeting text once and for all as a <strong>signature</strong> in the settings of the program. <a href='".$baseurl."/settings/index.php'><strong>The procedure how to define your own e-mail signature</strong></a> differs depending on what program or webmail service you are using.</p>\r\n" .
           "            <p>Once defined, <strong>the signature will be inserted automatically at the bottom of every new e-mail message you create</strong>, which greately reduces your work and in addition ensures that your e-mails have a uniform look.</p>\r\n" .
           "            <h3>Plain text and formatted signatures</h3>\r\n" .
           "            <p>The vast majority of e-mails sent only contain text, so <strong>it makes sense to define a signature with is just plain text</strong>. All webmail systems and most modern standalone e-mail programs of course can also handle HTML formatted text in e-mail messages, which allows choice of fonts, colours, layout and inclusion of images. Given this <strong>it is tempting to define the signature with HTML formatting, with the logotype of your organization and other niceties</strong>.</p>\r\n" .
           "            <p><a href='".$_SERVER["PHP_SELF"]."#create'><strong>Above</strong></a> you can see two examples of a signature, one in plain text and one HTML formatted.</p>\r\n" .
           "\r\n" .
           "          </div><div class='col-content-right'>\r\n" .
           "\r\n" .
           //"            <p style='margin-bottom:-1em'><img src='".PATH_IMG."/_wiki/signature_two_samples.png' alt=''></p>".
           "            <h3>Signature Best Practices</h3>\r\n" .
           "            <p>The formatted signature obviously looks nicer, but before choosing to use a formatted signature you should consider this:</p>\r\n" .
           "            <ul>\r\n" .
           "              <li>HTML formatting adds extra data to the mail message, especially if you use embedded images like logos. For one single message this increase in data size might seem harmless, but when one considers the enormous number of mails sent over the net and filling our inboxes one realizes that any small thing that can be done to <strong>reduce the overall data bloat on the net</strong> is welcome for everyone using the mail system.</li>\r\n" .
           "              <li>The majority of incoming HTML formatted mails may contain only pretty text and cute logotypes, but less conscientious spammers might embed code with undesirable side effects. <strong>Security</strong>-aware e-mail users therefore turn off automatic HTML display and will see your pretty signature as only plain text, with any logo image as an attachment.</li>\r\n" .
           "              <li>There are e-mail programs, like Pine or Alpine which are not uncommon in the academic world, which are <strong>text-only e-mail programs</strong>. Users of these programs cannot not see your logos, but will anyhow get the image files clogging their mailbox.</li>\r\n" .
           "            </ul>\r\n" .
           "            <p>Based on these considerations, <strong>the &quot;best practices&quot; recommendation is to use only plain text in e-mail messages, including signatures</strong>. Formatted data can always be sent as attachments, such as a PDF file.</p>\r\n" .
           "\r\n" .
           "          </div><div style='clear:both'><br></div>\r\n" .
           "\r\n";
     */
     /* OLD TEXT FOR SIGNATURE FILES
         $stdout .=
           "          <hr style='margin:0 0 2em 0'>\r\n";
     
         $stdout .=
           "          <div class='col-content-left'>\r\n" .
           "            <p>A <strong>signature file</strong> is a text file that can be incorporated in an e-mail program or webmail setup, so that <strong>the contents of the file are always appended at the end of every mail sent</strong>. Usually a signature file would contain the name, title and affiliation of the sender, and perhaps some more information like phone numbers, web pages, postal addresses or a favourite quote.</p>\r\n" .
           "            <p><strong>If you don't want to write all this information yourself</strong> into the appropriate settings section of your mail program, you can download a file with some of this information, following the instructions below. The file is HTML formatted, and you can edit it yourself in any text editor. When you are satisfied, you <strong>copy-paste the contents of the signature file into the settings of your mail program</strong>.</p>\r\n" .
           "            <p>This is roughly what a file would look like, when inserted at the end of a mail:</p>\r\n" .
           "            <p><img src='".PATH_IMG."/_wiki/signaturefile_sample_415x275.png' alt='' style='width:350px'></p>\r\n" .
           "          </div>\r\n" .
           "          <div class='col-content-right'>\r\n" .
           "            <h4>To download your HTML signature file</h4>\r\n" .
           "            <ol class='tightlist'>\r\n" .
           "              <li>Click on <a href='".$GLOBALS["documentClass"]->getPagePath()."/index.php#maildb_doorlabel' rel='nofollow'><strong>your linked name in the list below</strong></a>; a file saving dialogue window should appear (the details of the saving dialogue is different depending on which web browser you are using).</li>\r\n" .
           "              <li>Save the file as <strong>signature.html</strong> in a folder on your computer where there is no risk for it to be deleted later by accident. (Actually, the name of the signature file can be choosen at will, as long as the file extension is <strong>.html</strong>)</li>\r\n" .
           "            </ol>\r\n" .
           "            <h4>Incorporate the signature file in your e-mail program or webmail settings</h4>\r\n" .
           "            <p><a href='".$baseurl."/settings/index.php'><strong>The procedure how to activate the signature file in your e-mail program</strong></a> differs depending on what program you are using. Ask Hans Mühlen if you have problems.</p>\r\n" .
           "            <p><strong>Remember that this is a signature file written in HTML</strong>, which means you need to have <em>HTML composing</em> and <em>HTML sending</em> activated in your mail program for it to display properly for the recipient of your mails. Even then the signature part of your mails <strong>may become garbled during transmission</strong>, so using HTML in mails always involves a risk of the recipient not seeing what you intended. The usual recommendation therefore is always to send plain text mails with plain text (or no) signature. Formatted data can always be sent as attachments, such as a PDF file.</p>\r\n" .
           "          </div><div style='clear:both'><br></div>\r\n" .
           "\r\n";
     */
     return $stdout;
 }
Пример #28
0
                    ?>
 />
                                                    <input type="hidden" name="time_component_font_style[]" value="<?php 
                    echo $component_times->font_style;
                    ?>
" >
                                                    <div class="jPickerPosition"><input name="time_component_font_color[]" class="Multiple" type="hidden" style="width:60px;"  value="<?php 
                    echo functions::jPickerTransparent($component_times->font_color);
                    ?>
" />
                                                    </div>
                                                </div>
                                            </td>
                                            <td class="layout_settings_input" align="center">
                                                <input name="time_component_background_color[]" class="Multiple" type="hidden" style="width:60px;" value="<?php 
                    echo functions::jPickerTransparent($component_times->background_color);
                    ?>
" />
                                            </td>
                                            
                                        </tr>
                                        </tbody>
                                    </table> 
                                    <br />
                                </div>
                            </li>
                            <?php 
                }
            }
            ?>
                <?php 
Пример #29
0
                $text = functions::smileys($text, $res['rights'] ? 1 : 0);
            }
            $text = bbcode::notags($text);
            $text .= '...<a href="index.php?act=write&amp;id=' . $row['id'] . '">' . $lng['continue'] . ' &gt;&gt;</a>';
        } else {
            // Или, обрабатываем тэги и выводим весь текст
            $text = functions::checkout($last_msg['text'], 1, 1);
            if ($set_user['smileys']) {
                $text = functions::smileys($text, $res['rights'] ? 1 : 0);
            }
        }
        $arg = array('header' => '<span class="gray">(' . functions::display_date($last_msg['time']) . ')</span>', 'body' => '<div style="font-size: small">' . $text . '</div>', 'sub' => '<p><a href="index.php?act=write&amp;id=' . $row['id'] . '"><b>' . $lng_mail['correspondence'] . '</b></a> (' . $count_message . ') | <a href="index.php?act=ignor&amp;id=' . $row['id'] . '&amp;add">Игнор</a> | <a href="index.php?act=deluser&amp;id=' . $row['id'] . '">' . $lng['delete'] . '</a></p>', 'iphide' => 1);
        if (!$last_msg['read']) {
            echo '<div class="gmenu">';
        } else {
            echo $i % 2 ? '<div class="list1">' : '<div class="list2">';
        }
        echo functions::display_user($row, $arg);
        echo '</div>';
    }
} else {
    echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>';
}
echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>';
if ($total > $kmess) {
    echo '<div class="topmenu">' . functions::display_pagination('index.php?act=input&amp;', $start, $total, $kmess) . '</div>' . '<p><form action="index.php" method="get">
                <input type="hidden" name="act" value="input"/>
                <input type="text" name="page" size="2"/>
                <input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/></form></p>';
}
echo '<p><a href="../users/profile.php?act=office">' . $lng['personal'] . '</a></p>';
Пример #30
0
* @package     JohnCMS
* @link        http://johncms.com
* @copyright   Copyright (C) 2008-2011 JohnCMS Community
* @license     LICENSE.txt (see attached file)
* @version     VERSION.txt (see attached file)
* @author      http://johncms.com/about
*/
defined('_IN_JOHNCMS') or die('Error: restricted access');
$textl = $lng['users_list'];
$headmod = 'userlist';
require '../incfiles/head.php';
/*
-----------------------------------------------------------------
Выводим список пользователей
-----------------------------------------------------------------
*/
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `users`"), 0);
echo '<div class="phdr"><a href="index.php"><b>' . $lng['community'] . '</b></a> | ' . $lng['users_list'] . '</div>';
if ($total > $kmess) {
    echo '<div class="topmenu">' . functions::display_pagination('index.php?act=userlist&amp;', $start, $total, $kmess) . '</div>';
}
$req = mysql_query("SELECT `id`, `name`, `sex`, `lastdate`, `datereg`, `status`, `rights`, `ip`, `browser`, `rights` FROM `users` WHERE `preg` = 1 ORDER BY `datereg` DESC LIMIT {$start}, {$kmess}");
for ($i = 0; ($res = mysql_fetch_assoc($req)) !== false; $i++) {
    echo $i % 2 ? '<div class="list2">' : '<div class="list1">';
    echo functions::display_user($res) . '</div>';
}
echo '<div class="phdr">' . $lng['total'] . ': ' . $total . '</div>';
if ($total > $kmess) {
    echo '<div class="topmenu">' . functions::display_pagination('index.php?act=userlist&amp;', $start, $total, $kmess) . '</div>' . '<p><form action="index.php?act=userlist" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' &gt;&gt;"/>' . '</form></p>';
}
echo '<p><a href="search.php">' . $lng['search_user'] . '</a><br />' . '<a href="index.php">' . $lng['back'] . '</a></p>';