本文整理汇总了PHP中general类的典型用法代码示例。如果您正苦于以下问题:PHP general类的具体用法?PHP general怎么用?PHP general使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了general类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: clientezona
function clientezona()
{
$dataClienteZona = new ClienteZona();
$opciones = new general();
$zona = new Zona();
$cliente = new Cliente();
$url = "/" . $_REQUEST['url'];
$id = $_REQUEST['id'] != '' ? $_REQUEST['id'] : 1;
$data['Opcion'] = $opciones->buscaOpcionexurl($url);
$data['Modulo'] = $opciones->buscaModulosxurl($url);
$tamanio = 10;
$data['ClienteZona'] = $dataClienteZona->listado($id, $tamanio);
$total = count($data['ClienteZona']);
for ($i = 0; $i < $total; $i++) {
if ($data['ClienteZona'][$i]['idcliente'] != '' && $data['ClienteZona'][$i]['idcliente'] != 0) {
$data['ClienteZona'][$i]['nombrecli'] = $cliente->nombrexid($data['ClienteZona'][$i]['idcliente']);
}
if ($data['ClienteZona'][$i]['idzona'] != '' && $data['ClienteZona'][$i]['idzona'] != 0) {
$data['ClienteZona'][$i]['nombrezona'] = $zona->nombrexid($data['ClienteZona'][$i]['idzona']);
}
}
$data['Paginacion'] = 1;
$data['Pagina'] = 1;
$this->view->show("/mantenimiento/clientezona.phtml");
}
开发者ID:luigiguerreros,项目名称:erp,代码行数:25,代码来源:mantenimientocontroller.php
示例2: indexAction
function indexAction()
{
if (isset($_POST['check'])) {
if ($_POST['FORM']['ua'] == 'on') {
$_POST['FORM']['ua'] = 1;
} else {
$_POST['FORM']['ua'] = 0;
}
if ($_POST['FORM']['en'] == 'on') {
$_POST['FORM']['en'] = 1;
} else {
$_POST['FORM']['en'] = 0;
}
if ($_POST['FORM']['fr'] == 'on') {
$_POST['FORM']['fr'] = 1;
} else {
$_POST['FORM']['fr'] = 0;
}
if ($_POST['FORM']['esp'] == 'on') {
$_POST['FORM']['esp'] = 1;
} else {
$_POST['FORM']['esp'] = 0;
}
if ($_POST['FORM']['ger'] == 'on') {
$_POST['FORM']['ger'] = 1;
} else {
$_POST['FORM']['ger'] = 0;
}
forms::multy_update_form($this->tablename, 1, 0);
$this->msg = general::messages(1, v::getI18n('backend_after_save'));
}
$sql = "SELECT * FROM languages";
$res = mysql::query_one($sql, 0);
return system::show_tpl(array('obj' => $res, 'msg' => $this->msg, '_status' => isset($_POST['status']) ? $_POST['status'] : 2, 'tpl_folder' => $this->tpl_folder), $this->tpl_folder . '/index.php');
}
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:35,代码来源:languagesController.php
示例3: deleteAction
/**
* delete podrasdel
*/
function deleteAction()
{
$this->msg = general::messages(1, v::getI18n('backend_after_delete'));
// удаляем из таблицы Content
$_sql = 'DELETE FROM `' . $this->tablename . '` WHERE (`id`="' . $_GET['id'] . '")';
$result = mysql::just_query($_sql, 0);
return self::indexAction();
}
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:11,代码来源:votingController.php
示例4: get_menu
function get_menu()
{
$sql = "SELECT * FROM content WHERE status=1 and action!='index' and id_parent=0";
$result = mysql::query($sql, 0);
foreach ($result as $r) {
$res .= '<li><a ' . general::active_menu($r->action) . 'href="/' . $_GET['lang'] . '/' . $r->action . '">' . $r->name_ru . '</a></li>';
}
return $res;
}
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:9,代码来源:prizvanie.class.php
示例5: addAction
/**
* добавляем новый материал
*/
function addAction()
{
$this->table_name = $_GET['tablename'];
if ($_POST) {
// проверяем на checkbox
forms::check_box(array('status'));
// записываем в базу
forms::multy_insert_form($this->table_name, 0);
$this->msg = general::messages(1, v::getI18n('backend_after_save'));
}
return system::show_tpl(array('msg' => $this->msg, 'tpl_folder' => $this->tpl_folder), $this->tpl_folder . '/add.php');
}
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:15,代码来源:onelevelController.php
示例6: editAction
/**
* редактирование настроек
*/
function editAction()
{
if ($_POST) {
// записываем в базу
forms::multy_update_form_all_records($this->tablename, 'zna', 0);
$this->msg = general::messages(1, v::getI18n('backend_after_save'));
}
// строим запрос
$_sql = 'SELECT * FROM ' . $this->tablename . ' where status=1 order by sort';
// выполняем запрос + при необходимости выводим сам запрос
$result = mysql::query($_sql, 0);
return system::show_tpl(array('result' => $result, 'msg' => $this->msg, 'tpl_folder' => $this->tpl_folder), $this->tpl_folder . '/edit.php');
}
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:16,代码来源:configController.php
示例7: editAction
/**
* редактируем материал
*/
function editAction()
{
if ($_POST) {
// записываем в базу
forms::multy_update_form($this->tablename, $_POST['id'], 0);
$this->msg = general::messages(1, v::getI18n('backend_after_save'));
$_sql = 'SELECT * FROM ' . $this->tablename . ' where id=' . $_POST['id'];
} else {
$_sql = 'SELECT * FROM ' . $this->tablename . ' where id=' . $_GET['id'];
}
// выполняем запрос + при необходимости выводим сам запрос
$result = mysql::query_one($_sql, 0);
return system::show_tpl(array('obj' => $result, 'msg' => $this->msg, 'tpl_folder' => $this->tpl_folder), $this->tpl_folder . '/edit.php');
}
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:17,代码来源:seoController.php
示例8: _post
function _post($response)
{
include_once "../main.php";
// ищем группы меню и проверяем на СуперАдмина
if (general::sadmin()) {
$_sql = "select * from menu where id_parent=0 and status=1 order by zindex";
} else {
$_sql = "select * from menu where id_parent=0 and status=1 and adm!=1 order by zindex";
}
$result = mysql::query($_sql, 0);
$this->menu = system::show_tpl(array('result' => $result), 'mainmenu/menu.php');
$this->center_block = $response;
echo system::show_tpl((array) $this, $this->layout);
}
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:14,代码来源:Controller.class.php
示例9: indexAction
/**
* отображаем весь список материалов
*/
function indexAction()
{
// только для СуперАдмина
if (!general::sadmin()) {
return general::messages(0, v::getI18n('backend_orror_access'));
}
if ($_POST) {
// проверяем на checkbox
forms::check_box(dbh::menu_get_id());
// записываем в базу
forms::multy_update_form_all_records($this->tablename, 'status', 0);
$this->msg = general::messages(1, v::getI18n('backend_after_save'));
}
// строим запрос
$_sql = 'SELECT * FROM ' . $this->tablename . ' where id_parent=0 order by zindex';
// выполняем запрос + при необходимости выводим сам запрос
$result = mysql::query($_sql, 0);
return system::show_tpl(array('result' => $result, 'msg' => $this->msg), $this->tpl_folder . '/index.php');
}
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:22,代码来源:admController.php
示例10: addAction
/**
* добавляем новый материал
*/
function addAction()
{
if ($_POST) {
// загружаем файл
if ($_FILES) {
//$_arr=explode('.',$_FILES[file1][name]);
//$_file_name=v::toSlug($_arr[0]).'.'.$_arr[1];
preg_match('/(\\S+)\\.(\\S+)$/', $_FILES[file1][name], $_arr);
$_file_name = v::toSlug($_arr[1]) . '.' . $_arr[2];
//echo "<pre>".print_r($_FILES,1)."</pre>";
move_uploaded_file($_FILES[file1]['tmp_name'], HOST . PRICE_LIST_PATH . '/' . $_file_name);
$_POST['FORM']['pole'] = $_file_name;
}
// записываем в базу
forms::multy_insert_form($this->tablename, 0);
$this->msg = general::messages(1, v::getI18n('backend_after_save'));
header('Location: /backend/' . $this->tpl_folder . '/index');
}
return system::show_tpl(array('msg' => $this->msg, 'tpl_folder' => $this->tpl_folder), $this->tpl_folder . '/add.php');
}
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:23,代码来源:priceController.php
示例11: authorizeAction
/**
* мультиредактирование
*/
function authorizeAction()
{
//echo "<pre>".print_r($_POST['kt_where'] ,1)."</pre>";
foreach ($_POST['kt_where'] as $key => $value) {
//echo '<div style="width:200px; border: solid 0px red; color:#000000; background: yellow; padding: 2px; margin-left: 15px;"><b>'.$key.'</b> - '.$value.'</div>';
if ($_POST['st'] == 1) {
// авторизовуем
$_sql = "UPDATE `" . $this->tablename . "` SET `status`='1' WHERE (`id`='" . $value . "')";
$result = mysql::just_query($_sql, 0);
} else {
if ($_POST['st'] == 2) {
// авторизовуем
$_sql = "DELETE FROM `" . $this->tablename . "` WHERE (`id`='" . $value . "')";
$result = mysql::just_query($_sql, 0);
}
}
}
// сообщение
$this->msg = general::messages(1, v::getI18n('backend_after_save'));
return self::indexAction();
// редирект
//header('Location: /backend/gb/index'); ??????????????
}
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:26,代码来源:usersController.php
示例12:
echo general::date_from_database($obj->date_news);
?>
" class="validate[required] text_1" name="FORM[date_news]" id="datepicker" style="width: 20%;">
</div>
<div class="item_1">
<label for="status" class="block title_1">Публиковать?:</label>
<input name="FORM[status]" type="checkbox" <?php
echo $obj->status == 1 ? checked : '';
?>
id="status">
</div>
<div class="item_1 textcenter">
<?php
echo general::link_to($tpl_folder . '/index', 'Вернуться к общему списку');
?>
<input type="submit" name="submit" value="Сохранить">
</div>
</div>
<input name="id" type="hidden" value="<?php
echo $obj->id;
?>
">
</form>
<script type="text/javascript">
$(document).ready(function(){
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:31,代码来源:new.php
示例13: error_reporting
}
// если печатаем страницу
if (isset($_GET['action']) and $_GET['action'] == "print") {
require HOST . "/ctrl/print/print.php";
exit;
}
if (DEBUG_SITE == 1) {
error_reporting(E_ALL);
ini_set('display_errors', 1);
}
if (DEBUG_SITE == 1) {
// время
$profiler->enterSection('center');
}
// выводим контентовую часть
$_str = general::center();
if (DEBUG_SITE == 1) {
// время
$profiler->leaveSection('center');
}
/*
* данный блок используется ЕСЛИ НЕОБХОДИМО ПОДСТАВЛЯТЬ НЕСКОЛЬКО ШАБЛОНОВ (начало)
*/
// подставляем необходимый шаблон
/*
$name_file="/tpl/index_full.tpl.html";
if (isset($_GET['action'])) {
switch ($_GET['action']) {
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:30,代码来源:index.php
示例14: __
" id="image" style="margin:0; border: 0px;" />
<a style="display:block; font:11px/1.2em Arial;" href="#" onclick="document.getElementById('image').src = '/plagin/captcha/securimage_show.php?sid=' + Math.random(); return false"><?php
echo __('update_image');
?>
</a>
</td>
</tr>
</table>
</div>
<div class="row sdvig">
<input type="submit" class="but" value="<?php
echo __('send');
?>
" name="submit" />
</div>
</form>
<?endif?>
<?endforeach?>
</div>
</div>
<!-- сообщения -->
<?php
echo general::global_massage();
?>
<!-- сообщения -->
</body>
</html>
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:31,代码来源:index_full_bu.php
示例15: foreach
<?php
if (!empty($meja_list)) {
$no = 1;
foreach ($meja_list as $meja) {
?>
<tr>
<td><?php
echo $no;
?>
</td>
<td><?php
echo $meja->no_meja;
?>
</td>
<td style="text-align: center;"><?php
echo general::status($meja->status);
?>
</td>
<td style="text-align: center;"><a href="<?php
echo site_url('page=meja&act=meja_reset&id=' . $this->encrypt->encode_url($meja->id));
?>
" onclick="return confirm('Reset Meja ?')"><i class="fa fa-recycle"></i> Kosongkan</a></td>
<td style="text-align: center;"><a href="<?php
echo site_url('page=meja&act=meja_hapus&id=' . $this->encrypt->encode_url($meja->id));
?>
" onclick="return confirm('Hapus Meja ?')"><i class="fa fa-remove"></i> Hapus</a></td>
</tr>
<?php
$no++;
}
}
开发者ID:mikhaelfelian,项目名称:PROJECT-RESTO-TIGERA,代码行数:31,代码来源:meja_list.php
示例16: foreach
<?php
foreach ($result as $obj) {
?>
<div class="list_item">
<a href="<?php
echo general::link('catalog/goods/' . $obj->id, $obj->name);
?>
" class="list_item_link">
<span class="list_item_name"><?php
echo $obj->name;
?>
</span>
<span class="list_item_photo">
<?php
if (file_exists(HOST . IMG_CATALOG_PATH . '/01/' . $obj->id . '_1.jpg')) {
?>
<img src="<?php
echo IMG_CATALOG_PATH . '/01/' . $obj->id . '_1.jpg';
?>
" alt="<?php
echo $obj->name;
?>
">
<?php
}
?>
<span class="helper"></span>
</span>
</a>
<span class="list_item_cost line-through gray"><?php
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:30,代码来源:special_block3.php
示例17: addAction
/**
* добавляем новый материал
*/
function addAction()
{
if ($_POST) {
$_sql_files = 'SELECT * FROM splash WHERE status=0 order by id';
$_files = mysql::query($_sql_files, 0);
foreach ($_files as $_files) {
// поля
if (isset($_POST['FORM1']['status_' . $_files->id])) {
$_POST['FORM']['status'] = 1;
} else {
$_POST['FORM']['status'] = 0;
}
$_POST['FORM']['url'] = $_POST['FORM1']['url_' . $_files->id];
$_POST['FORM']['name'] = $_POST['FORM1']['name_' . $_files->id];
// записываем в базу
forms::multy_update_form($this->tablename, $_files->id, 0);
}
$this->msg = general::messages(1, v::getI18n('backend_after_save'));
}
$_sql_files = 'SELECT * FROM splash where status=0 order by sort';
$_files = mysql::query($_sql_files, 0);
return system::show_tpl(array('msg' => $this->msg, 'tpl_folder' => $this->tpl_folder, '_files' => $_files), $this->tpl_folder . '/add.php');
}
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:26,代码来源:splashController.php
示例18: str_replace
if ($mime == "application/pdf") {
$thumb = DIRECTORY_SEPARATOR . str_replace(".pdf", "_thumb.png", $file);
//test_array($thumb);
if (!file_exists($folder . $thumb) && file_exists($folder . $file)) {
$exportPath = $folder . $thumb;
$res = "96";
$pdf = $folder . $file;
$str = "gs -dCOLORSCREEN -dNOPAUSE -box -sDEVICE=png16m -dUseCIEColor -dTextAlphaBits=4 -dFirstPage=1 -dLastPage=1 -dGraphicsAlphaBits=4 -o{$exportPath} -r{$res} {$pdf}";
exec($str);
\general::remove_white($folder . $thumb);
}
$file = DIRECTORY_SEPARATOR . str_replace(".pdf", ".png", $file);
}
//test_array($file);
if ($file) {
$gen = new \general();
$gen->thumbnail($file, $width, $height, $crop, $enlarge);
}
});
$f3->route('GET|POST /logout', function ($f3, $params) use($user) {
session_start();
session_unset();
session_destroy();
session_write_close();
setcookie(session_name(), '', 0, '/');
session_regenerate_id(true);
//session_destroy();
$f3->reroute("/login");
});
function get_websafe()
{
开发者ID:WilliamStam,项目名称:Directory,代码行数:31,代码来源:index.php
示例19: deletefileAction
/**
* удаляем загруженный файл
*/
function deletefileAction()
{
// сообщение
$this->msg = general::messages(1, v::getI18n('backend_after_delete_file'));
// определяем имя удаляего файла
$_sql = 'SELECT * FROM `files` where id=' . $_GET['id_photo'];
$result = mysql::query_one($_sql, 0);
// имя файла на удаление
$_name = array($_GET['id_photo'] . '.' . end(explode(".", $result->name)));
// удаляем файл
forms::delete_photo(HOST . FILES_PATH, $_name, 0);
// удаляем запись из базы
$_sql = 'DELETE FROM `files` WHERE (`id`="' . $_GET['id_photo'] . '")';
$result = mysql::just_query($_sql, 0);
// выводим новость
return self::newAction();
}
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:20,代码来源:contentController.php
示例20: confirm
<tr>
<td><?php
echo general::link_to('voting/deletea/id/' . $obj->id, 'Удалить?', 'onclick="return confirm(\'Вы уверены?\')"');
?>
</td>
<td><?php
echo $obj->answer;
?>
</td>
<td><?php
echo $obj->q;
?>
</td>
<td><?php
echo $obj->amount;
?>
</td>
<td><?php
echo general::link_to('voting/edita/id/' . $obj->id, 'Редактировать');
?>
</td>
</tr>
<?php
}
?>
</table>
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:30,代码来源:answer.php
注:本文中的general类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论