Exemplo n.º 1
0
		/** Shows the dialog with the GtkCalendar()-object. */
		function showDialog(){
			$date_unix = msgbox(gtext("Choose date"), $this->date_unix, "date");
			if ($date_unix){
				$this->date_unix = $date_unix;
				$this->entry->set_text(date("d-m-Y", $date_unix));
				$this->eventm->callEvent("changed", $this->date_unix);
				$this->eventm->callEVent("changed-manually", $this->date_unix);
			}
		}
Exemplo n.º 2
0
 public static function load()
 {
     $msg_ajax = "Vous n'êtes pas autorisé(e) à accéder à cette application , redirection vers acceuil.... \\AJAX";
     $msg_app = "Vous n'êtes pas autorisé(e) à accéder à cette application , redirection vers acceuil.... \\APP";
     $msg_file = "Vous n'êtes pas autorisé(e) à accéder à cette application , redirection vers acceuil.... \\FILE";
     $msg_perm = "Vous n'êtes pas autorisé(e) à accéder à cette application , redirection vers acceuil.... \\PERMISSION_USER";
     $msg_sess = "Vous n'êtes pas autorisé(e) à accéder à cette application , redirection vers acceuil.... \\SESSION_USER";
     //Check if is Ajax request
     if (empty($_SERVER['HTTP_X_REQUESTED_WITH']) && tg('_tsk') !== 'shopdf') {
         exit(msgbox($msg_ajax, 0, './', 5));
     }
     global $db;
     Cookie::auto_lastexec('time');
     Cookie::auto_logout('time', 600);
     //Cookie::session_autoclosed();
     //Start check APP
     if (tg('_tsk') == '0') {
         exit("3#{$msg_app}");
     }
     $app_id = tg('_tsk');
     if (!$db->Query("SELECT * FROM task where  app='" . $app_id . "' ")) {
         $db->Kill($db->Error());
     }
     if ($db->RowCount() == 0) {
         exit("3#{$msg_app}");
     }
     $array = $db->RowArray();
     $appc_idc = $array['id'];
     $needsession = $array['session'];
     $app_rep = $array['rep'];
     $app_file = $array['file'];
     $array_godapp = array(1, 2, 3, 4, 5, 6, 11, 21, 43, 49, 56, 57, 58, 59, 70, 130, 138, 157);
     if ($needsession == 1 && !isset($_SESSION['userid'])) {
         exit("3#{$msg_sess}");
     }
     if (!in_array($appc_idc, $array_godapp)) {
         $sql = "SELECT *  FROM permission_users where perm=1 and  appid=" . $appc_idc . " and userid=" . $_SESSION['userid'];
         if (!$db->Query($sql)) {
             $db->Kill($db->Error());
         }
         if ($db->RowCount() <= 0) {
             exit("3#{$msg_perm}");
         }
     }
     if (!file_exists(CONTROLLER_REP . $app_rep . SLASH . $app_file . '_c.php')) {
         exit("3#{$msg_file}");
     }
     define('ACTIV_APP', $array['dscrip']);
     define('MODUL_APP', $array['modul']);
     define('APP_ID', $array['id']);
     require_once CONTROLLER_REP . SLASH . $app_rep . SLASH . $app_file . '_c.php';
 }
Exemplo n.º 3
0
function profileload()
{
    $path = ENGINE_DIR . '/data/xfields.txt';
    $filecontents = file($path);
    if (!is_array($filecontents)) {
        msgbox('Информация', 'Невозможно загрузить файл', 'javascript:history.go(-1)');
        exit;
    }
    foreach ($filecontents as $name => $value) {
        $filecontents[$name] = explode("|", trim($value));
        foreach ($filecontents[$name] as $name2 => $value2) {
            $value2 = str_replace("&#124;", "|", $value2);
            $value2 = str_replace("__NEWL__", "\r\n", $value2);
            $filecontents[$name][$name2] = $value2;
        }
    }
    return $filecontents;
}
Exemplo n.º 4
0
            $name = trim(stripslashes($name));
            $name = htmlspecialchars($name, ENT_QUOTES);
            $name = preg_replace($find, $replace, $name);
        }
        $value = str_replace("\$", "&#036;", $value);
        $value = str_replace("{", "&#123;", $value);
        $value = str_replace("}", "&#125;", $value);
        $name = str_replace("\$", "&#036;", $name);
        $name = str_replace("{", "&#123;", $name);
        $name = str_replace("}", "&#125;", $name);
        $value = $db->safesql($value);
        fwrite($handler, "'{$name}' => \"{$value}\",\n\n");
    }
    fwrite($handler, ");\n\n?>");
    fclose($handler);
    msgbox('Настройки сохранены', 'Настройки системы были успешно сохранены!', '?mod=system');
} else {
    echoheader();
    echohtmlstart('Общие настройки');
    //Чтение всех шаблон в папке "templates"
    $root = './templates/';
    $root_dir = scandir($root);
    foreach ($root_dir as $templates) {
        if ($templates != '.' and $templates != '..' and $templates != '.htaccess') {
            $for_select .= str_replace('value="' . $config['temp'] . '"', 'value="' . $config['temp'] . '" selected', '<option value="' . $templates . '">' . $templates . '</option>');
        }
    }
    //Чтение всех языков
    $root_dir2 = scandir('./lang/');
    foreach ($root_dir2 as $lang) {
        if ($lang != '.' and $lang != '..' and $lang != '.htaccess') {
Exemplo n.º 5
0
                                $tpl->set('[owner]', '');
                                $tpl->set('[/owner]', '');
                            } else {
                                $tpl->set_block("'\\[owner\\](.*?)\\[/owner\\]'si", "");
                            }
                            if ($row['friend_id'] == $user_info['user_id']) {
                                $tpl->set_block("'\\[viewer\\](.*?)\\[/viewer\\]'si", "");
                            } else {
                                $tpl->set('[viewer]', '');
                                $tpl->set('[/viewer]', '');
                            }
                            $tpl->compile('content');
                        }
                        navigation($gcount, $friends_sql['user_friends_num'], $config['home_url'] . 'friends/' . $get_user_id . '/page/');
                    } else {
                        msgbox('', $lang['no_requests'], 'info_2');
                    }
                } else {
                    msgbox('', $lang['no_requests'], 'info_2');
                }
            } else {
                $user_speedbar = $lang['error'];
                msgbox('', $lang['no_notes'], 'info');
            }
    }
    $db->free();
    $tpl->clear();
} else {
    $user_speedbar = 'Информация';
    msgbox('', $lang['not_logged'], 'info');
}
Exemplo n.º 6
0
/***************************************************************************\
| Sypex Dumper Lite          version 1.0.8b                                 |
| (c)2003-2006 zapimir       zapimir@zapimir.net       http://sypex.net/    |
| (c)2005-2006 BINOVATOR     info@sypex.net                                 |
|---------------------------------------------------------------------------|
|     created: 2003.09.02 19:07              modified: 2006.10.27 03:30     |
|---------------------------------------------------------------------------|
\***************************************************************************/
if (!defined('MOZG')) {
    die('Hacking attempt!');
}
header('Content-type: text/html; charset=windows-1251');
$lang = array('dumper_1' => "Бэкап БД успешно создан в папке /backup/", 'dumper_2' => "Создается резервная копия БД", 'dumper_3' => "ОШИБКА! Не указана база данных!", 'dumper_4' => "Не удается выбрать базу данных.<br />", 'dumper_5' => "Создание файла с резервной копией БД:", 'dumper_6' => "Не удается изменить кодировку соединения.<br />", 'dumper_7' => "Установлена кодировка соединения", 'dumper_8' => "Кодировка соединения и таблицы не совпадает:", 'dumper_9' => "Таблица", 'dumper_10' => "соединение", 'dumper_11' => "Обработка таблицы", 'dumper_12' => "Резервная копия БД", 'dumper_13' => "создана.", 'dumper_14' => "Размер БД:", 'dumper_15' => "Размер файла:", 'dumper_16' => "Таблиц обработано:", 'dumper_17' => "Строк обработано:", 'dumper_18' => "Восстановление БД из резервной копии", 'dumper_19' => "ОШИБКА! Не указана база данных!", 'dumper_20' => "Подключение к БД", 'dumper_21' => "ОШИБКА! Файл не найден!", 'dumper_22' => "Чтение файла", 'dumper_23' => "Неправильный запрос.", 'dumper_24' => "БД восстановлена из резервной копии.", 'dumper_25' => "Дата создания копии:", 'dumper_26' => "Запросов к БД:", 'dumper_27' => "Таблиц создано:", 'dumper_28' => "Строк добавлено:", 'dumper_29' => "Статус таблицы:", 'dumper_30' => "Общий статус:", 'dumper_31' => "Возникла ошибка!");
if ($user_info['user_group'] != 1) {
    msgbox("error", 'error', 'error');
}
ob_end_flush();
define('PATH', ROOT_DIR . '/backup/');
define('URL', 'backup/');
define('TIME_LIMIT', 600);
define('LIMIT', 1);
define('DBNAMES', DBNAME);
define('DBNUSER', DBUSER);
define('DBPREFIX', PREFIX);
// Кодировка соединения с MySQL
// auto - автоматический выбор (устанавливается кодировка таблицы), cp1251 - windows-1251, и т.п.
define('CHARSET', 'auto');
// Кодировка соединения с MySQL при восстановлении
// На случай переноса со старых версий MySQL (до 4.1), у которых не указана кодировка таблиц в дампе
// При добавлении 'forced->', к примеру 'forced->cp1251', кодировка таблиц при восстановлении будет принудительно заменена на cp1251
Exemplo n.º 7
0
            $tpl->set('{author-id}', $row['auser_id']);
            $tpl->compile('content');
        }
    } elseif ($type == 6) {
        $tpl->load_template('search/result_groups.tpl');
        foreach ($sql_ as $row) {
            if ($row['photo']) {
                $tpl->set('{ava}', '/uploads/groups/' . $row['id'] . '/100_' . $row['photo']);
            } else {
                $tpl->set('{ava}', '{theme}/images/no_ava_groups_100.gif');
            }
            $tpl->set('{public-id}', $row['id']);
            $tpl->set('{name}', stripslashes($row['title']));
            $tpl->set('{note-id}', $row['id']);
            $tpl->set('{traf}', $row['traf'] . ' ' . gram_record($row['traf'], 'groups_users'));
            if ($row['adres']) {
                $tpl->set('{adres}', $row['adres']);
            } else {
                $tpl->set('{adres}', 'public' . $row['id']);
            }
            $tpl->compile('content');
        }
    } else {
        msgbox('', $lang['search_none'], 'info_2');
    }
    navigation($gcount, $count['cnt'], '/index.php?' . $query_string . '&page=');
} else {
    msgbox('', '', 'info_search');
}
$tpl->clear();
$db->free();
Exemplo n.º 8
0
$tableSchema = array();
$tableSchema[] = "ALTER TABLE `" . PREFIX . "_vote` ADD `grouplevel` VARCHAR(250) NOT NULL DEFAULT 'all'";
foreach ($tableSchema as $table) {
    $db->query($table);
}
$handler = fopen(ENGINE_DIR . '/data/config.php', "w") or die("Извините, но невозможно записать информацию в файл <b>.engine/data/config.php</b>.<br />Проверьте правильность проставленного CHMOD!");
fwrite($handler, "<?PHP \n\n//System Configurations\n\n\$config = array (\n\n");
foreach ($config as $name => $value) {
    fwrite($handler, "'{$name}' => \"{$value}\",\n\n");
}
fwrite($handler, ");\n\n?>");
fclose($handler);
$fdir = opendir(ENGINE_DIR . '/cache/system/');
while ($file = readdir($fdir)) {
    if ($file != '.' and $file != '..' and $file != '.htaccess') {
        @unlink(ENGINE_DIR . '/cache/system/' . $file);
    }
}
@unlink(ENGINE_DIR . '/data/snap.db');
clear_cache();
if ($db->error_count) {
    $error_info = "Всего запланировано запросов: <b>" . $db->query_num . "</b> Неудалось выполнить запросов: <b>" . $db->error_count . "</b>. Возможно они уже выполнены ранее.<br /><br /><div class=\"quote\"><b>Список не выполненных запросов:</b><br /><br />";
    foreach ($db->query_list as $value) {
        $error_info .= $value['query'] . "<br /><br />";
    }
    $error_info .= "</div>";
} else {
    $error_info = "";
}
msgbox("info", "Информация", "Обновление базы данных с версии <b>9.7</b> до версии <b>9.8</b> успешно завершено.<br /><br />{$error_info}<br />Нажмите далее для продолжения процессa обновления скрипта.");
Exemplo n.º 9
0
defined('WCROOT') or die('Access Denied');
require WCROOT . PS . "config" . PS . "config_" . $_SESSION['domain'] . ".php";
$db = new db();
$sqlfile = WCROOT . '/install/data/basic.sql';
file_exists($sqlfile) or die('<br /><font color="#F00">数据库安装文件丢失:' . $sqlfile . '</font>');
$sql = file_get_contents($sqlfile);
$sql = str_replace("\r\n", "\n", $sql);
if (empty($sql)) {
    die('无法获取安装数据。file_get_contents()');
}
$sql = trim(str_replace("\r", "\n", str_replace(' `ws_', ' `' . $db_config['db_pre'], $sql)));
$ret = explode(";\n", $sql);
unset($sql);
$result = true;
foreach ($ret as $sql) {
    $sql = trim($sql);
    @$db->execute($sql) or $result = false;
}
if ($result) {
    msgbox('', 'index.php?step=6');
} else {
    echo '<div style="padding:30px 0 30px 20px; color:#F00;">系统模块安装失败,请重新安装或尝试跳过这一步。</div>';
}
?>
<table width="100%"><tr>
<td width="80" height="80">&nbsp;</td>
<td align="center"><a href="index.php?step=4" onfocus="this.blur()"><img src="images/button_prev.png" width="112" height="35" /></a></td>
<td align="center"><a href="index.php?step=6" onfocus="this.blur()"><img src="images/button_next.png" width="112" height="35" /></a></td>
<td width="80">&nbsp;</td>
</tr></table>
Exemplo n.º 10
0
    }
}
if ($config['allow_admin_wysiwyg'] == "1" or $config['allow_site_wysiwyg'] == "1" or $config['allow_static_wysiwyg'] == "1") {
    $js_array .= "\n<script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js\"></script>";
    $js_array .= "\n<script type=\"text/javascript\" src=\"{$config['http_home_url']}engine/editor/scripts/webfont.js\"></script>";
    $js_array .= "\n<link media=\"screen\" href=\"{$config['http_home_url']}engine/editor/css/default.css\" type=\"text/css\" rel=\"stylesheet\" />";
}
if ($video_found) {
    $js_array .= "\n<link media=\"screen\" href=\"{$config['http_home_url']}engine/classes/html5player/mediaelementplayer.css\" type=\"text/css\" rel=\"stylesheet\" />";
}
if (stripos($tpl->copy_template, "{content}") !== false) {
    $custom_news = false;
}
if ($_SERVER['QUERY_STRING'] and !$tpl->result['content'] and !$tpl->result['info'] and !$custom_news) {
    @header("HTTP/1.0 404 Not Found");
    msgbox($lang['all_err_1'], $lang['news_err_27']);
}
if (count($onload_scripts)) {
    $onload_scripts = implode("\n", $onload_scripts);
    $ajax .= <<<HTML

jQuery(function(\$){
{$onload_scripts}
});
HTML;
} else {
    $onload_scripts = "";
}
$ajax .= <<<HTML

//-->
Exemplo n.º 11
0
        if ($er) {
            $all_er .= '<li>' . $er . '</li>';
        }
    }
    if ($all_er) {
        msgbox('Ошибка', $all_er, '?mod=mysettings');
    } else {
        if ($newPassOk) {
            $db->query("UPDATE `" . PREFIX . "_users` SET user_name = '" . $user_name . "', user_lastname = '" . $user_lastname . "', user_email = '" . $user_email . "', user_search_pref = '" . $user_name . " " . $user_lastname . "' WHERE user_id = '" . $user_info['user_id'] . "'");
        } else {
            $db->query("UPDATE `" . PREFIX . "_users` SET user_name = '" . $user_name . "', user_lastname = '" . $user_lastname . "', user_email = '" . $user_email . "', user_password = '******', user_search_pref = '" . $user_name . " " . $user_lastname . "' WHERE user_id = '" . $user_info['user_id'] . "'");
        }
        //clear cache
        mozg_clear_cache_file('user_' . $user_info['user_id'] . '/profile_' . $user_info['user_id']);
        mozg_clear_cache();
        msgbox('Изменения сохранены', 'Ваша персональная информация была успешно сохранена', '?mod=mysettings');
    }
} else {
    echoheader();
    echohtmlstart('Редактирование собственного профиля');
    echo <<<HTML
<style type="text/css" media="all">
.inpu{width:300px;}
textarea{width:300px;height:100px;}
</style>

<form method="POST" action="">

<div class="fllogall">E-mail:</div><input type="text" name="email" class="inpu" value="{$row['user_email']}" /><div class="mgcler"></div>

<div class="fllogall">Имя:</div><input type="text" name="name" class="inpu" value="{$row['user_name']}" /><div class="mgcler"></div>
Exemplo n.º 12
0
if (!$is_logged) {
    $login_panel = str_replace("{result}", $result, $login_panel);
    echo $login_panel;
    exit;
}
if (!is_writable(ENGINE_DIR . '/data/')) {
    msgbox("info", "Информация", "Установите права для записи на папку 'engine/data/' CHMOD 777");
}
if (!is_writable(ENGINE_DIR . '/data/config.php')) {
    msgbox("info", "Информация", "Установите права для записи на файл 'engine/data/config.php' CHMOD 666");
}
if (!is_writable(ENGINE_DIR . '/data/dbconfig.php')) {
    msgbox("info", "Информация", "Установите права для записи на файл 'engine/data/dbconfig.php' CHMOD 666");
}
if (!is_writable(ENGINE_DIR . '/data/xfields.txt')) {
    msgbox("info", "Информация", "Установите права для записи на файл 'engine/data/xfields.txt' CHMOD 666");
}
if (!$_SESSION['dle_update']) {
    echo $skin_header;
    echo <<<HTML
<form action="index.php" method="GET">
<input type="hidden" name="next" value="start">
<div class="box">
  <div class="box-header">
    <div class="title">Информация</div>
  </div>
  <div class="box-content">
\t<div class="row box-section">
\t\t<font color="red"><b>Внимание:</b></font><br /><br />Прежде чем приступить к процедуре обновления скрипта и базы данных, убедитесь что вы создали и сохранили у себя полные бекапы файлов скрипта и базы данных. Процедура обновления вносит необратимые изменения в структуру базы данных, отмена которых в будущем будет невозможна, вернуть в предыдущее состояние базу данных, можно будет только путем восстановления бекапов базы данных. Также во время процедуры обновления скрипт выполняет тяжелые запросы к базе данных, выполнение которых может потребовать продолжительное время, поэтому обновление рекомендуется проводить во время минимальной нагрузки на сервер. Для больших сайтов, имеющие большое количество публикаций, рекомендуется предварительно проводить обновление на локальном компьютере.
\t</div>
\t<div class="row box-section">
Exemplo n.º 13
0
$restrictions = array();
if (isset($_GET['restrict'])) {
    list($key, $value) = explode(":", $_GET['restrict'], 2);
    $restrictions[$key] = $value;
}
$row = $DB->q('MAYBETUPLE SELECT t.*, a.country, c.name AS catname,
                                 a.shortname AS affshortname, a.name AS affname
               FROM team t
               LEFT JOIN team_category c USING (categoryid)
               LEFT JOIN team_affiliation a ON (t.affilid = a.affilid)
               WHERE teamid = %i', $id);
if (!$row) {
    error("Invalid team identifier");
}
if (isset($_GET['edited'])) {
    echo addForm('refresh_cache.php') . msgbox("Warning: Refresh scoreboard cache", "If the membership of a team in a contest was changed, it may be necessary to recalculate any cached scoreboards.<br /><br />" . addSubmit('recalculate caches now', 'refresh')) . addEndForm();
}
$users = $DB->q('TABLE SELECT userid,username FROM user WHERE teamid = %i', $id);
$affillogo = "../images/affiliations/" . urlencode($row['affilid']) . ".png";
$countryflag = "../images/countries/" . urlencode($row['country']) . ".png";
$teamimage = "../images/teams/" . urlencode($row['teamid']) . ".jpg";
echo "<h1>Team " . specialchars($row['name']) . "</h1>\n\n";
if ($row['enabled'] != 1) {
    echo "<p><em>Team is disabled</em></p>\n\n";
}
?>

<div class="col1"><table>
<tr><td>ID:        </td><td>t<?php 
echo specialchars($row['teamid']);
?>
                    db_fieldsmemory($rsConsultaConfigDBPref, 0);
                    if (isset($sEmailServ) && $sEmailServ != '') {
                        $oMail = new Smtp();
                        $oMail->Send($mailpref, $w13_emailadmin, 'Prefeitura On-Line - Esqueci Minha Senha', $mensagemDestinatario);
                        msgbox("Uma mensagem foi encaminhada para o e-mail: {$sEmailServ}");
                    }
                    db_logs("", "", 0, "Esqueci minha senha: cgc ou cpf - {$sCgcCpf}");
                }
            } else {
                $sMsg = "Dados informados NÃO encontrados no cadastro da Prefeitura!\\n\n                   Procure o balcão da Prefeitura para realizar seu cadastro.";
                msgbox($sMsg);
                db_redireciona("centro_pref.php");
            }
        } else {
            $sMsg = "Dados informados NÃO encontrados no cadastro da Prefeitura!\\n\n                 Procure o balcão da Prefeitura para realizar seu cadastro.";
            msgbox($sMsg);
            db_redireciona("centro_pref.php");
        }
    }
}
function formataDataNascBanco($sData)
{
    $data = str_replace("/", "", $sData);
    $datanasc_dia = substr($data, -8, 2);
    $datanasc_mes = substr($data, -6, 2);
    $datanasc_ano = substr($data, -4);
    $datanasc = $datanasc_ano . "-" . $datanasc_mes . "-" . $datanasc_dia;
    return $datanasc;
}
function formataCpfBanco($sCpf)
{
Exemplo n.º 15
0
                set_cookie("hid", $hid, 365);
                header("Location: {$admin_link}");
            } else {
                $error_log = 'Доступ отключён!';
            }
        } else {
            $error_log = 'Доступ отключён!';
        }
    }
}
if (!$logged) {
    echoheader();
    echohtmlstart('Вход в панель управления');
    echo <<<HTML
<form method="POST" action="">
 <div class="fllogall">E-mail:</div><input type="text" name="email" class="inpu" />&nbsp; <font color="red">{$error_log}</font>
 <div class="mgcler"></div>
 <div class="fllogall">Пароль:</div><input type="password" name="pass" class="inpu" />
 <div class="mgcler"></div>
 <div class="fllogall">&nbsp;</div><input type="submit" class="inp fl_l" name="log_in" value="Войти" style="margin-top:5px" />
</form>
<div class="clear"></div>
HTML;
    echohtmlend();
} else {
    if ($user_info['user_group'] == 1) {
        include ADMIN_DIR . '/mod.php';
    } else {
        msgbox('Информация', 'У вас недостаточно прав для просмотра этого раздела. <a href="' . $admin_link . '?act=logout">Выйти</a>', '');
    }
}
    	<td align="left" >Complemento:
    	</td>
    	<td align="left" ><input name="it22_compl" type="text" size="60" >
    	</td>
  	</tr>
  	<tr >
    	<td align="left" >&nbsp;
    	</td>
    	<td align="left" >
    	<?php 
if ($cod != "") {
    $sql = "select * from itbidadosimovel where it22_itbi ={$cod}";
    $result = pg_query($sql);
    $linhas = pg_num_rows($result);
    if ($linhas > 0) {
        msgbox("xxxxxx" . $linhas);
        db_fieldsmemory($result, 0);
        ?>
    	
    		
    		<input name="alterar" type="submit" value="Alterar" class="botao" onclick="js_verifica();">
    	</td>
  	</tr>
  	
</table>
</form>
<html>
<?php 
        echo "\n\t\t<script>\n\t\t\tdocument.form1.it22_sequencial.value ={$it22_sequencial};\n\t\t\tdocument.form1.it22_setor.value      ={$it22_setor};\n\t\t\tdocument.form1.it22_quadra.value     ={$it22_quadra} ;\n\t\t \tdocument.form1.it22_lote.value       ={$it22_lote} ;\n\t\t\tdocument.form1.it22_descrlograd.value='{$it22_descrlograd}';\n\t\t\tdocument.form1.it22_numero.value     ={$it22_numero};\n\t\t\tdocument.form1.it22_compl.value      ='{$it22_compl}';  \n\t\t</script>\n\t\t";
    } else {
        ?>
Exemplo n.º 17
0
    }
    if ($row['user_id']) {
        $db->query("SELECT id FROM " . USERPREFIX . "_ignore_list WHERE user='******'user_id']}' AND user_from='{$member_id['name']}'");
        if ($db->num_rows()) {
            $stop_pm = true;
            $lang['pm_err_8'] = $lang['pm_ignored'];
        }
        $db->free();
    }
    if (!$stop_pm) {
        $tpl->compile('content');
        $tpl->clear();
    } else {
        $tpl->clear();
        if (!$tpl->result['info']) {
            msgbox($lang['all_info'], $lang['pm_err_8']);
        }
    }
} elseif (!$stop_pm) {
    $tpl->set('[pmlist]', "");
    $tpl->set('[/pmlist]', "");
    $tpl->set_block("'\\[newpm\\].*?\\[/newpm\\]'si", "");
    $tpl->set_block("'\\[readpm\\].*?\\[/readpm\\]'si", "");
    $pm_per_page = 20;
    if (isset($_GET['cstart'])) {
        $cstart = intval($_GET['cstart']);
    } else {
        $cstart = 0;
    }
    if ($cstart) {
        $cstart = $cstart - 1;
     $script = false;
 } elseif (pg_result($result, 0, "z01_cgccpf") == "00000000000000" || pg_result($result, 0, "z01_cgccpf") == "              " || trim(pg_result($result, 0, "z01_cgccpf")) != "{$cgccpf}") {
     $script = true;
 } elseif (pg_numrows($result) == 1) {
     db_fieldsmemory($result, 0);
     //$sql2 = "select * from iptubase where j01_numcgm = $z01_numcgm";
     //$result2 = @db_query($sql2);
     //if(pg_numrows($result2)==0){
     //  db_redireciona("certidao.php");
     //}else{
     // db_redireciona("digitamatricula.php");
     //}
     //exit;
 } else {
     if (pg_numrows($result) > 1) {
         msgbox("Inconsistencia de dados, procure a Prefeitura.");
         setcookie("cookie_codigo_cgm");
         db_redireciona("certidaonome003.php?outro");
         $script = false;
     }
 }
 //	if (! isset ( $DB_LOGADO ) && $m_publico != 't') {
 //		$sql = "select fc_permissaodbpref(" . db_getsession ( "DB_login" ) . ",1,$codigo_cgm)";
 //		$result = db_query ( $sql );
 //		if (pg_numrows ( $result ) == 0) {
 //			db_redireciona ( "digitacontribuinte.php?" . base64_encode ( 'erroscripts=Acesso não Permitido. Contate a Prefeitura.' ) );
 //			exit ();
 //		}
 //		$result = pg_result ( $result, 0, 0 );
 //		if ($result == "0") {
 //			db_redireciona ( "digitacontribuinte.php?" . base64_encode ( 'erroscripts=Acesso não Permitido. Contate a Prefeitura.' ) );
Exemplo n.º 19
0
            }
            $db->free();
            if ($_POST['allow_subscribe'] and $user_group[$member_id['user_group']]['allow_subscribe'] and !$found_subscribe) {
                if (function_exists('openssl_random_pseudo_bytes')) {
                    $stronghash = md5(openssl_random_pseudo_bytes(15));
                } else {
                    $stronghash = md5(uniqid(mt_rand(), TRUE));
                }
                $salt = str_shuffle($stronghash);
                $s_hash = "";
                for ($i = 0; $i < 10; $i++) {
                    $s_hash .= $salt[mt_rand(0, 31)];
                }
                $s_hash = md5($s_hash);
                $db->query("INSERT INTO " . PREFIX . "_subscribe (user_id, name, email, news_id, hash) values ('{$member_id['user_id']}', '{$member_id['name']}', '{$member_id['email']}', '{$post_id}', '{$s_hash}')");
            }
        }
        if ($config['allow_alt_url'] and !$config['seo_type']) {
            $cprefix = "full_";
        } else {
            $cprefix = "full_" . $post_id;
        }
        clear_cache(array('news_', 'rss', 'comm_' . $post_id, $cprefix));
        if (!$ajax_adds and !$CN_HALT) {
            header("Location: {$_SERVER['REQUEST_URI']}");
            die;
        }
    } else {
        msgbox($lang['all_err_1'], implode("<br />", $stop) . "<br /><br /><a href=\"javascript:history.go(-1)\">" . $lang['all_prev'] . "</a>");
    }
}
Exemplo n.º 20
0
            // Our color field can be both a HTML color name and an RGB value,
            // so we output it only in the human-readable field "color" and
            // leave the field "rgb" unset.
            $problem['color'] = $prob['color'];
            $contest_data['problems'][] = $problem;
        }
    }
    $yaml = Spyc::YAMLDump($contest_data);
    echo $yaml;
    header('Content-type: text/x-yaml');
    header('Content-Disposition: attachment; filename="contest.yaml"');
    exit;
}
$title = "Import / export configuration";
require LIBWWWDIR . '/header.php';
echo "<h1>Import / export configuration</h1>\n\n";
if (isset($_GET['import-ok'])) {
    echo msgbox("Import successful!", "The file " . specialchars(@$_GET['file']) . " is successfully imported.");
}
echo "<h2>Import from YAML</h2>\n\n";
echo addForm('impexp_contestyaml.php', 'post', null, 'multipart/form-data');
echo msgbox("Please note!", "Importing a contest.yaml may overwrite some settings " . "(e.g. penalty time, clarification categories, clarification answers, etc.)." . "This action can not be undone!");
echo addFileField('import_config');
echo addSubmit('Import', 'import') . addEndForm();
echo "<h2>Export to YAML</h2>\n\n";
echo addForm('impexp_contestyaml.php');
echo '<label for="contest">Select contest: </label>';
$contests = $DB->q("KEYVALUETABLE SELECT cid, name FROM contest");
echo addSelect('contest', $contests, null, true);
echo addSubmit('Export', 'export') . addEndForm();
require LIBWWWDIR . '/footer.php';
Exemplo n.º 21
0
        case "company_add":
        case "company_doadd":
        case "company_edit":
        case "company_save":
        case "company_del":
            require ENGINE_DIR . "/job/user/company_add.php";
            break;
        default:
            require ENGINE_DIR . "/job/user/default.php";
            break;
    }
} catch (Exception $e) {
    if ($member_id['user_group'] == 1) {
        msgbox("Error", $e->getMessage());
    } else {
        msgbox("Error", $lang_job['global_error']);
    }
}
if ($job->member['id']) {
    $tpl->result['content'] = preg_replace('#\\[not-logged\\](.*?)\\[/not-logged\\]#si', '', $tpl->result['content']);
    $tpl->result['content'] = preg_replace('#\\[logged\\](.*?)\\[/logged\\]#si', "\\1", $tpl->result['content']);
} else {
    $tpl->result['content'] = preg_replace('#\\[not-logged\\](.*?)\\[/not-logged\\]#si', "\\1", $tpl->result['content']);
    $tpl->result['content'] = preg_replace('#\\[logged\\](.*?)\\[/logged\\]#si', '', $tpl->result['content']);
}
$TitleSpeedBar = $template->TitleSpeedBar();
if (AJAX) {
    $s_navigation = str_replace(array("'", "&#039;"), array("&#039;", "&#039;"), "<a href=\"{$config['http_home_url']}\">" . $config['home_title'] . "</a> &raquo; " . $TitleSpeedBar['speedbar']);
    @header("Content-type: text/css; charset=" . $config['charset']);
    echo <<<JS
<script language='JavaScript' type="text/javascript">
Exemplo n.º 22
0
                    break;
                case 'NOCONSTRAINT':
                    break;
                default:
                    error("{$t}.{$key} is referenced in {$table} with unknown action '{$action}'.");
            }
        }
    }
}
if (isset($_POST['confirm'])) {
    // LIMIT 1 is a security measure to prevent our bugs from
    // wiping a table by accident.
    $DB->q("DELETE FROM {$t} WHERE %SS LIMIT 1", $k);
    auditlog($t, implode(', ', $k), 'deleted');
    echo "<p>" . ucfirst($t) . " <strong>" . specialchars(implode(", ", $k)) . "</strong> has been deleted.</p>\n\n";
    if (!empty($referrer)) {
        echo "<p><a href=\"" . $referrer . "\">back to overview</a></p>";
    } else {
        // one table falls outside the predictable filenames
        $tablemulti = $t == 'team_category' ? 'team_categories' : $t . 's';
        echo "<p><a href=\"" . $tablemulti . ".php\">back to {$tablemulti}</a></p>";
    }
} else {
    echo addForm($pagename) . addHidden('table', $t);
    foreach ($k as $key => $val) {
        echo addHidden($key, $val);
    }
    echo msgbox("Really delete?", "You're about to delete {$t} <strong>" . specialchars(join(", ", array_values($k))) . (empty($desc) ? '' : ' "' . specialchars($desc) . '"') . "</strong>.<br />\n" . (count($warnings) > 0 ? "<br /><strong>Warning, this will:</strong><br />" . implode('<br />', $warnings) : '') . "<br /><br />\n" . "Are you sure?<br /><br />\n\n" . (empty($referrer) ? '' : addHidden('referrer', $referrer)) . addSubmit(" Never mind... ", 'cancel') . addSubmit(" Yes I'm sure! ", 'confirm'));
    echo addEndForm();
}
require LIBWWWDIR . '/footer.php';
Exemplo n.º 23
0
 public static function session_autoclosed()
 {
     global $db;
     if (isset($_SESSION['ssid'])) {
         $ssid = $_SESSION['ssid'];
         $expired = $db->QuerySingleValue0("select expir from session where id='{$ssid}'");
         if ($expired != NULL) {
             Cookie::close_session_open();
             model::load('login', 'login');
             //Stop session
             stop_session();
             token::delimda();
             $msg = "Vous êtes déconnecté automatiquement pour inactivité de 5 min {$expired} {$ssid} , redirection vers page login....  ";
             exit(msgbox($msg, 0, './', 5));
         }
     }
 }
Exemplo n.º 24
0
                    } else {
                        if (!is_email($_POST['email'])) {
                            msgbox($lang_error['all_error'], $lang_error['ucp_st_info_5'], 1);
                        } else {
                            if (tru_email($_POST['email'], $username) == 2) {
                                msgbox($lang_error['all_error'], $lang_error['ucp_st_info_6'], 1);
                            } else {
                                if (!$resp->is_valid) {
                                    msgbox($lang_error['all_error'], $lang_error['err_01.5'], 1);
                                } else {
                                    if ($row['pPhousekey'] != 999) {
                                        //$db->query("UPDATE accounts SET pKey = '$passwd_in1' WHERE Name = '$username'") or die(mysql_error());
                                    } else {
                                        $db->query("UPDATE accounts SET pKey = '{$passwd_in1}', pEmail = '{$email}' WHERE Name = '{$username}'") or die(mysql_error());
                                    }
                                    msgbox($lang_error['all_info'], $lang_error['all_yes'], 0);
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    $tpl->set('{email}', $email);
} else {
    $tpl->set('{email}', $row['pEmail']);
}
$tpl->set('{username}', str_replace('_', ' ', $row['Name']));
$tpl->compile('settings');
eval(' ?' . '>' . $tpl->result['settings'] . '<' . '?php ');
Exemplo n.º 25
0
<div class="mgcler"></div>

<div class="fllogall" style="width:140px">Удалить фото:</div>
 <input type="checkbox" name="del_photo" style="margin-bottom:10px" />
<div class="mgcler"></div>

<div class="fllogall" style="width:140px">&nbsp;</div>
 <input type="submit" value="Сохранить" class="inp" name="save" style="margin-top:0px" />
 <input type="submit" value="Назад" class="inp" style="margin-top:0px" onClick="history.go(-1); return false" />

</form>
HTML;
            echohtmlend();
        }
    } else {
        msgbox('Ошибка', 'Сообщество не найдено', '?mod=groups');
    }
    die;
}
echoheader();
$se_uid = intval($_GET['se_uid']);
if (!$se_uid) {
    $se_uid = '';
}
$se_user_id = intval($_GET['se_user_id']);
if (!$se_user_id) {
    $se_user_id = '';
}
$sort = intval($_GET['sort']);
$se_name = textFilter($_GET['se_name'], false, true);
if ($se_uid or $sort or $se_name or $se_user_id or $_GET['ban'] or $_GET['delet']) {
Exemplo n.º 26
0
\t\t\tterm: extractLast( request.term )
\t\t}, response );
\t},
\tsearch: function() {
\t\tvar term = extractLast( this.value );
\t\tif ( term.length < 3 ) {
\t\t\treturn false;
\t\t}
\t},
\tfocus: function() {
\t\treturn false;
\t},
\tselect: function( event, ui ) {
\t\tvar terms = split( this.value );
\t\tterms.pop();
\t\tterms.push( ui.item.value );
\t\tterms.push( '' );
\t\tthis.value = terms.join( ', ' );
\t\treturn false;
\t}
});
HTML;
        }
        $script .= "<form method=\"post\" name=\"entryform\" id=\"entryform\" onsubmit=\"if(checkxf()=='fail') return false;\" action=\"\">";
        $tpl->copy_template = $categoryfilter . $script . $tpl->copy_template . "<input type=\"hidden\" name=\"mod\" value=\"addnews\" /></form>";
        $tpl->compile('content');
        $tpl->clear();
    } else {
        msgbox($lang['all_info'], "{$lang['add_err_8']}<br /><a href=\"javascript:history.go(-1)\">{$lang['all_prev']}</a>");
    }
}
Exemplo n.º 27
0
unset($config['allow_upload']);
unset($config['news_captcha']);
$tableSchema = array();
$tableSchema[] = "ALTER TABLE `" . PREFIX . "_usergroups` ADD `admin_tagscloud` TINYINT( 1 ) NOT NULL DEFAULT '0'";
$tableSchema[] = "UPDATE " . PREFIX . "_usergroups SET `admin_tagscloud` = '1' WHERE id = '1'";
$tableSchema[] = "ALTER TABLE `" . PREFIX . "_comments` ADD INDEX `post_id` ( `post_id` ), ADD INDEX `approve` ( `approve` )";
foreach ($tableSchema as $table) {
    $db->query($table);
}
$handler = fopen(ENGINE_DIR . '/data/config.php', "w") or die("Извините, но невозможно записать информацию в файл <b>.engine/data/config.php</b>.<br />Проверьте правильность проставленного CHMOD!");
fwrite($handler, "<?PHP \n\n//System Configurations\n\n\$config = array (\n\n");
foreach ($config as $name => $value) {
    fwrite($handler, "'{$name}' => \"{$value}\",\n\n");
}
fwrite($handler, ");\n\n?>");
fclose($handler);
$fdir = opendir(ENGINE_DIR . '/cache/system/');
while ($file = readdir($fdir)) {
    if ($file != '.' and $file != '..' and $file != '.htaccess') {
        @unlink(ENGINE_DIR . '/cache/system/' . $file);
    }
}
@unlink(ENGINE_DIR . '/data/snap.db');
clear_cache();
if ($db->error_count) {
    $error_info = "Всего запланировано запросов: <b>" . $db->query_num . "</b> Неудалось выполнить запросов: <b>" . $db->error_count . "</b>. Возможно они уже выполнены ранее.";
} else {
    $error_info = "";
}
msgbox("info", "Информация", "<form action=\"index.php\" method=\"GET\">Обновление базы данных с версии <b>9.0</b> до версии <b>9.2</b> успешно завершено.<br />{$error_info}<br />Нажмите далее для продолжения процессa обновления скрипта<br /><br /><input type=\"hidden\" name=\"next\" value=\"9.2\"><input class=\"btn btn-success\" type=\"submit\" value=\"Далее ...\"></form>");
                    $sqlerro = true;
                }
                $clitbinomecgm->it21_itbinome = $clitbinome->it03_seq;
                $clitbinomecgm->it21_numcgm = $z01_numcgm;
                $clitbinomecgm->incluir($it21_sequencial);
                if (isset($clitbinomecgm->erro_status) && $clitbinomecgm->erro_status == 0) {
                    $erro = "Outros proprietarios itbinomecgm : " . $clitbinomecgm->erro_msg;
                    $sqlerro = true;
                }
            }
        }
        // fim da transação.... se tiver ok mostra a msg e chama a outra tela
        db_fim_transacao($sqlerro);
        if ($sqlerro == false) {
            $codigo = $clitbi->it01_guia;
            msgbox("ITBI {$codigo} incluida com sucesso");
            session_register("itbi");
            $_SESSION["itbi"] = $codigo;
            echo "\n\t\t\t<script>\n           \t\tparent.document.form1.disabilitado.value='nao';\n\t\t\t\tlocation.href = 'itbi_dadosimovel.php';\n\t\t\t\tparent.trocacor('2');\n\t\t\t</script>\n\t\t";
        }
    }
}
//fim do incluir
if (isset($incluir)) {
    if ($incluir == "Alterar") {
        $clitbi->it01_guia = $cod;
        $clitbi->it01_tipotransacao = $it01_tipotransacao;
        $clitbi->it01_areaterreno = $it01_areaterreno;
        $clitbi->it01_areaedificada = $it01_areaedificada;
        $clitbi->it01_obs = $it01_obs;
        $clitbi->it01_valortransacao = $it01_valortransacao;
        redireciona("digitafornecedor.php");
        exit;
    } else {
        if (Encriptacao::hash($DB_senha) != @pg_result($result, 0, 0)) {
            msgbox("ERRO: Senha Incorreta.");
            redireciona("digitafornecedor.php");
            exit;
        }
    }
}
//reenvio de senha
if (Encriptacao::hash($DB_senha) != @pg_result($result, 1, 0)) {
    $result = @db_query("select login,senha from db_usuarios where trim(login) = '{$cgccpf}' ");
}
if (@pg_num_rows($result) == 0) {
    msgbox("ERRO: REGISTRO NÃO ENCONTRADO.");
    exit;
}
//////////////////////////////////////////////////////////////
db_mensagem("opcoesfornecedor_cab", "opcoesfornecedor_rod");
mens_help();
?>
<html>
<head>
<title>opcoesimovel</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" src="javascript/db_script.js"></script>
<script>
js_verificapagina("digitafornecedor.php,index.php");
</script>
</head>
Exemplo n.º 30
0
@ini_set('error_reporting', E_ALL ^ E_NOTICE);
define('DATALIFEENGINE', true);
define('ROOT_DIR', "..");
define('ENGINE_DIR', ROOT_DIR . '/engine');
require_once ENGINE_DIR . '/data/config.php';
require_once 'mysql.php';
require_once ENGINE_DIR . '/data/dbconfig.php';
require_once ENGINE_DIR . '/inc/include/functions.inc.php';
$version_id = $config_version_id ? $config_version_id : $config['version_id'];
extract($_REQUEST, EXTR_SKIP);
$js_array = array();
$theme = ENGINE_DIR;
$dle_version = "9.6";
require_once dirname(__FILE__) . '/template.php';
if (strtolower($config['charset']) != "utf-8") {
    msgbox("info", "Информация", "Обновление базы данных невозможно, DataLife Engine UTF Edition предназначен для обновления сайтов использующих кодировку сайта UTF-8. ");
    die;
}
switch ($version_id) {
    case $dle_version:
        include dirname(__FILE__) . '/finish.php';
        break;
    case "9.5":
        include dirname(__FILE__) . '/9.5.php';
        break;
    case "9.4":
        include dirname(__FILE__) . '/9.4.php';
        break;
    case "9.3":
        include dirname(__FILE__) . '/9.3.php';
        break;