当前位置: 首页>>代码示例>>PHP>>正文


PHP rex_view::error方法代码示例

本文整理汇总了PHP中rex_view::error方法的典型用法代码示例。如果您正苦于以下问题:PHP rex_view::error方法的具体用法?PHP rex_view::error怎么用?PHP rex_view::error使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在rex_view的用法示例。


在下文中一共展示了rex_view::error方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getEntriesByTimeline

 public static function getEntriesByTimeline()
 {
     //Start - get all timelines from the database
     $sql = rex_sql::factory();
     $timelines = $sql->getArray('SELECT `user_id` FROM `' . rex::getTablePrefix() . 'socialhub_facebook_timeline`');
     unset($sql);
     if (empty($timelines)) {
         return false;
     }
     //End - get all timelines from the database
     //Start - get all accounts from the database
     $sql = rex_sql::factory();
     $accounts = $sql->getArray('SELECT * FROM `' . rex::getTablePrefix() . 'socialhub_facebook_account` ORDER BY `id` ASC');
     unset($sql);
     if (empty($accounts)) {
         return false;
     }
     //End - get all accounts from the database
     //Start - get entries by timeline from twitter
     foreach ($timelines as $timeline) {
         $fb = new Facebook\Facebook(['app_id' => $accounts[0]['app_id'], 'app_secret' => $accounts[0]['app_secret'], 'default_graph_version' => 'v2.5', 'default_access_token' => $accounts[0]['app_id'] . '|' . $accounts[0]['app_secret']]);
         try {
             $response = $fb->get('/' . $timeline['user_id'] . '/posts');
         } catch (Facebook\Exceptions\FacebookResponseException $e) {
             echo rex_view::error('Graph returned an error: ' . $e->getMessage());
         } catch (Facebook\Exceptions\FacebookSDKException $e) {
             echo rex_view::error('Facebook SDK returned an error: ' . $e->getMessage());
         }
         if (empty($response)) {
             return;
         }
         $response = json_decode($response->getBody(), true);
         foreach ($response['data'] as $post) {
             list($userID, $postID) = explode('_', $post['id']);
             $newPost = rex_sql::factory();
             $newPost->setTable(rex::getTablePrefix() . 'socialhub_entry_timeline');
             $newPost->setWhere(['post_id' => $postID]);
             $newPost->select();
             if ($newPost->getRows() === 0) {
                 $newPost->reset();
                 $newPost->setTable(rex::getTablePrefix() . 'socialhub_entry_timeline');
                 $newPost->setValue('source', 'facebook');
                 $newPost->setValue('post_id', $postID);
                 $newPost->setValue('message', $post['message']);
                 $newPost->setValue('author_id', $userID);
                 $newPost->setValue('created_time', date('Y-m-d H:i:s', strtotime($post['created_time'])));
                 $newPost->setValue('query', '/' . $timeline['user_id'] . '/posts');
                 try {
                     $newPost->insert();
                 } catch (rex_sql_exception $e) {
                     echo rex_view::warning($e->getMessage());
                 }
             }
         }
     }
     //End - get entries by timeline from twitter
 }
开发者ID:phoebusryan,项目名称:rex_socialhub,代码行数:57,代码来源:class.rex_socialhub_facebook.php

示例2: nl2br

        echo rex_view::error($this->i18n('delete_error', $name));
    }
    $func = '';
}
if ($func == 'execute') {
    $manager = rex_cronjob_manager_sql::factory();
    $name = $manager->getName($oid);
    $success = $manager->tryExecute($oid);
    $msg = '';
    if ($manager->hasMessage()) {
        $msg = '<br /><br />' . $this->i18n('log_message') . ': <br />' . nl2br($manager->getMessage());
    }
    if ($success) {
        echo rex_view::success($this->i18n('execute_success', $name) . $msg);
    } else {
        echo rex_view::error($this->i18n('execute_error', $name) . $msg);
    }
    $func = '';
}
if ($func == '') {
    $query = 'SELECT id, name, type, `interval`, environment, execution_moment, status FROM ' . REX_CRONJOB_TABLE . ' ORDER BY name';
    $list = rex_list::factory($query, 30, 'cronjobs');
    $list->setNoRowsMessage($this->i18n('no_cronjobs'));
    $tdIcon = '<i class="rex-icon rex-icon-cronjob"></i>';
    $thIcon = '<a href="' . $list->getUrl(['func' => 'add']) . '" title="' . $this->i18n('add') . '"><i class="rex-icon rex-icon-add-cronjob"></i></a>';
    $list->addColumn($thIcon, $tdIcon, 0, ['<th class="rex-table-icon">###VALUE###</th>', '<td class="rex-table-icon">###VALUE###</td>']);
    $list->setColumnParams($thIcon, ['func' => 'edit', 'oid' => '###id###']);
    $list->removeColumn('id');
    $list->removeColumn('type');
    $list->setColumnLabel('name', $this->i18n('name'));
    $list->setColumnParams('name', ['func' => 'edit', 'oid' => '###id###']);
开发者ID:VIEWSION,项目名称:redaxo,代码行数:31,代码来源:cronjobs.php

示例3:

        }
        $content = '
            <form action="' . rex_url::currentBackendPage() . '" method="post">
            ' . $content . '
            </form>';
        echo $message;
        echo $content;
        $OUT = false;
    }
}
if ($OUT) {
    if ($success != '') {
        $message .= rex_view::success($success);
    }
    if ($error != '') {
        $message .= rex_view::error($error);
    }
    $list = rex_list::factory('SELECT id, name FROM ' . rex::getTablePrefix() . 'module ORDER BY name');
    $list->addTableAttribute('class', 'table-striped table-hover');
    $tdIcon = '<i class="rex-icon rex-icon-module"></i>';
    $thIcon = '<a href="' . $list->getUrl(['function' => 'add']) . '"' . rex::getAccesskey(rex_i18n::msg('create_module'), 'add') . ' title="' . rex_i18n::msg('create_module') . '"><i class="rex-icon rex-icon-add-module"></i></a>';
    $list->addColumn($thIcon, $tdIcon, 0, ['<th class="rex-table-icon">###VALUE###</th>', '<td class="rex-table-icon">###VALUE###</td>']);
    $list->setColumnParams($thIcon, ['function' => 'edit', 'module_id' => '###id###']);
    $list->setColumnLabel('id', rex_i18n::msg('id'));
    $list->setColumnLayout('id', ['<th class="rex-table-id">###VALUE###</th>', '<td class="rex-table-id" data-title="' . rex_i18n::msg('id') . '">###VALUE###</td>']);
    $list->setColumnLabel('name', rex_i18n::msg('module_description'));
    $list->setColumnParams('name', ['function' => 'edit', 'module_id' => '###id###']);
    $list->addColumn(rex_i18n::msg('module_functions'), '<i class="rex-icon rex-icon-edit"></i> ' . rex_i18n::msg('edit'));
    $list->setColumnLayout(rex_i18n::msg('module_functions'), ['<th class="rex-table-action" colspan="2">###VALUE###</th>', '<td class="rex-table-action">###VALUE###</td>']);
    $list->setColumnParams(rex_i18n::msg('module_functions'), ['function' => 'edit', 'module_id' => '###id###']);
    $list->addColumn(rex_i18n::msg('delete_module'), '<i class="rex-icon rex-icon-delete"></i> ' . rex_i18n::msg('delete'));
开发者ID:DECAF,项目名称:redaxo,代码行数:31,代码来源:modules.modules.php

示例4: getFormattedMessage

 public function getFormattedMessage()
 {
     if (null === $this->message) {
         return null;
     }
     if ($this->isSuccessfull()) {
         return rex_view::success($this->message);
     } else {
         return rex_view::error($this->message);
     }
 }
开发者ID:DECAF,项目名称:redaxo,代码行数:11,代码来源:api_function.php

示例5: rex_select

        if (rex_file::putConfig($configFile, $config) > 0) {
            $success = rex_i18n::msg('info_updated');
        }
    }
}
$sel_lang = new rex_select();
$sel_lang->setStyle('class="form-control"');
$sel_lang->setName('settings[lang]');
$sel_lang->setId('rex-id-lang');
$sel_lang->setSize(1);
$sel_lang->setSelected(rex::getProperty('lang'));
foreach (rex_i18n::getLocales() as $l) {
    $sel_lang->addOption($l, $l);
}
if (!empty($error)) {
    echo rex_view::error(implode('<br />', $error));
}
if ($info != '') {
    echo rex_view::info($info);
}
if ($success != '') {
    echo rex_view::success($success);
}
$dbconfig = rex::getProperty('db');
$version = rex_path::src();
if (strlen($version) > 21) {
    $version = substr($version, 0, 8) . '..' . substr($version, strlen($version) - 13);
}
$content = [];
$content[] = '
                        <h3>' . rex_i18n::msg('delete_cache') . '</h3>
开发者ID:staabm,项目名称:redaxo,代码行数:31,代码来源:system.settings.php

示例6: rex_mediapool_Mediaform

/**
 * Ausgabe des Medienpool Formulars.
 */
function rex_mediapool_Mediaform($form_title, $button_title, $rex_file_category, $file_chooser, $close_form)
{
    global $ftitle, $warning, $info;
    $s = '';
    $cats_sel = new rex_media_category_select();
    $cats_sel->setStyle('class="form-control"');
    $cats_sel->setSize(1);
    $cats_sel->setName('rex_file_category');
    $cats_sel->setId('rex-mediapool-category');
    $cats_sel->addOption(rex_i18n::msg('pool_kats_no'), '0');
    $cats_sel->setAttribute('onchange', 'this.form.submit()');
    $cats_sel->setSelected($rex_file_category);
    if (isset($warning)) {
        if (is_array($warning)) {
            if (count($warning) > 0) {
                $s .= rex_view::error(implode('<br />', $warning));
            }
        } elseif ($warning != '') {
            $s .= rex_view::error($warning);
        }
        $warning = '';
    }
    if (isset($info)) {
        if (is_array($info)) {
            if (count($info) > 0) {
                $s .= rex_view::success(implode('<br />', $info));
            }
        } elseif ($info != '') {
            $s .= rex_view::success($info);
        }
        $info = '';
    }
    if (!isset($ftitle)) {
        $ftitle = '';
    }
    $arg_fields = '';
    foreach (rex_request('args', 'array') as $arg_name => $arg_value) {
        $arg_fields .= '<input type="hidden" name="args[' . $arg_name . ']" value="' . $arg_value . '" />' . "\n";
    }
    $opener_input_field = rex_request('opener_input_field', 'string');
    if ($opener_input_field != '') {
        $arg_fields .= '<input type="hidden" name="opener_input_field" value="' . htmlspecialchars($opener_input_field) . '" />' . "\n";
    }
    $add_submit = '';
    if ($close_form && $opener_input_field != '') {
        $add_submit = '<button class="btn btn-save" type="submit" name="saveandexit" value="' . rex_i18n::msg('pool_file_upload_get') . '"' . rex::getAccesskey(rex_i18n::msg('pool_file_upload_get'), 'save') . '>' . rex_i18n::msg('pool_file_upload_get') . '</button>';
    }
    $panel = '';
    $formElements = [];
    $e = [];
    $e['label'] = '<label for="rex-mediapool-title">' . rex_i18n::msg('pool_file_title') . '</label>';
    $e['field'] = '<input class="form-control" type="text" id="rex-mediapool-title" name="ftitle" value="' . htmlspecialchars($ftitle) . '" />';
    $formElements[] = $e;
    $e = [];
    $e['label'] = '<label for="rex-mediapool-category">' . rex_i18n::msg('pool_file_category') . '</label>';
    $e['field'] = $cats_sel->get();
    $formElements[] = $e;
    $fragment = new rex_fragment();
    $fragment->setVar('elements', $formElements, false);
    $panel .= $fragment->parse('core/form/form.php');
    $panel .= rex_extension::registerPoint(new rex_extension_point('MEDIA_FORM_ADD', ''));
    if ($file_chooser) {
        $e = [];
        $e['label'] = '<label for="rex-mediapool-choose-file">' . rex_i18n::msg('pool_file_file') . '</label>';
        $e['field'] = '<input id="rex-mediapool-choose-file" type="file" name="file_new" />';
        $e['note'] = '<h3>' . rex_i18n::msg('phpini_settings') . '</h3>
                        <dl class="dl-horizontal">
                        ' . (rex_ini_get('file_uploads') == 0 ? '<dt><span class="text-warning">' . rex_i18n::msg('pool_upload') . '</span></dt><dd><span class="text-warning">' . rex_i18n::msg('pool_upload_disabled') . '</span></dd>' : '') . '
                            <dt>' . rex_i18n::msg('pool_max_uploadsize') . ':</dt><dd>' . rex_formatter::bytes(rex_ini_get('upload_max_filesize')) . '</dd>
                            <dt>' . rex_i18n::msg('pool_max_uploadtime') . ':</dt><dd>' . rex_ini_get('max_input_time') . 's</dd>
                        </dl>';
        $fragment = new rex_fragment();
        $fragment->setVar('elements', [$e], false);
        $panel .= $fragment->parse('core/form/form.php');
    }
    $formElements = [];
    $e = [];
    $e['field'] = '<button class="btn btn-save" type="submit" name="save" value="' . $button_title . '"' . rex::getAccesskey($button_title, 'save') . '>' . $button_title . '</button>';
    $formElements[] = $e;
    $e = [];
    $e['field'] = $add_submit;
    $formElements[] = $e;
    $fragment = new rex_fragment();
    $fragment->setVar('elements', $formElements, false);
    $buttons = $fragment->parse('core/form/submit.php');
    $fragment = new rex_fragment();
    $fragment->setVar('title', $form_title, false);
    $fragment->setVar('body', $panel, false);
    $fragment->setVar('buttons', $buttons, false);
    $content = $fragment->parse('core/page/section.php');
    $s .= ' <form action="' . rex_url::currentBackendPage() . '" method="post" enctype="multipart/form-data">
                <fieldset>
                    <input type="hidden" name="media_method" value="add_file" />
                    ' . $arg_fields . '
                    ' . $content . '
                </fieldset>
            ';
//.........这里部分代码省略.........
开发者ID:skerbis,项目名称:redaxo,代码行数:101,代码来源:function_rex_mediapool.php

示例7: catch

                $user->setValue('password', $redaxo_user_pass);
                $user->setValue('admin', 1);
                $user->addGlobalCreateFields('setup');
                $user->setValue('status', '1');
                try {
                    $user->insert();
                } catch (rex_sql_exception $e) {
                    $errors[] = rex_view::error(rex_i18n::msg('setup_604'));
                }
            }
        }
    } else {
        $gu = rex_sql::factory();
        $gu->setQuery('select * from ' . rex::getTablePrefix() . 'user LIMIT 1');
        if ($gu->getRows() == 0) {
            $errors[] = rex_view::error(rex_i18n::msg('setup_605'));
        }
    }
    if (count($errors) == 0) {
        $step = 7;
    } else {
        $step = 6;
    }
}
if ($step == 6) {
    $user_sql = rex_sql::factory();
    $user_sql->setQuery('select * from ' . rex::getTablePrefix() . 'user LIMIT 1');
    $headline = rex_view::title(rex_i18n::msg('setup_600'));
    $submit_message = rex_i18n::msg('setup_610');
    if (count($errors) > 0) {
        $submit_message = rex_i18n::msg('setup_611');
开发者ID:alsahh,项目名称:redaxo,代码行数:31,代码来源:setup.php

示例8: rex_extension_point

                            } else {
                                $dcounter++;
                                echo rex_view::error(rex_i18n::msg('yform_manager_import_error_dataimport', $error));
                            }
                        }
                    }
                }
                $show_list = true;
            }
            rex_extension::registerPoint(new rex_extension_point('yform_DATASET_IMPORTED', '', array('divider' => $div, 'table' => $this->table, 'filename' => $filename, 'replacefield' => $replacefield, 'missing_columns' => $missing_columns, 'debug' => $debug, 'data_imported' => $counter, 'data_not_imported' => $dcounter, 'data_empty_rows' => $ecounter, 'data_replaced' => $rcounter, 'data_inserted' => $icounter, 'data_errors' => $errorcounter)));
            echo rex_view::info(rex_i18n::msg('yform_manager_import_error_dataimport', $icounter + $rcounter, $icounter, $rcounter));
        } else {
            echo rex_view::info(rex_i18n::msg('yform_manager_import_error_not_started'));
        }
        if ($dcounter > 0) {
            echo rex_view::error(rex_i18n::msg('yform_manager_import_info_data_imported', $dcounter));
        }
    }
}
if ($show_importform) {
    $hidden = '
        <input type="hidden" name="func" value="import" />
        <input type="hidden" name="send" value="1" />';
    foreach ($this->getLinkVars() as $k => $v) {
        $hidden .= '<input type="hidden" name="' . $k . '" value="' . addslashes($v) . '" />';
    }
    $content = '
        <p>' . rex_i18n::msg('yform_manager_import_csv_info') . '</p>
        <fieldset>
            ' . $hidden . '
    ';
开发者ID:VIEWSION,项目名称:redaxo_yform,代码行数:31,代码来源:data_import.php

示例9: rex_exception

if (empty($prefix)) {
    throw new rex_exception('Fehler: Prefix nicht definiert!');
}
if (empty($metaTable)) {
    throw new rex_exception('Fehler: metaTable nicht definiert!');
}
$Basedir = __DIR__;
$field_id = rex_request('field_id', 'int');
//------------------------------> Feld loeschen
if ($func == 'delete') {
    $field_id = rex_request('field_id', 'int', 0);
    if ($field_id != 0) {
        if (rex_metainfo_delete_field($field_id)) {
            echo rex_view::success(rex_i18n::msg('minfo_field_successfull_deleted'));
        } else {
            echo rex_view::error(rex_i18n::msg('minfo_field_error_deleted'));
        }
    }
    $func = '';
}
//------------------------------> Eintragsliste
if ($func == '') {
    $title = rex_i18n::msg('minfo_field_list_caption');
    // replace LIKE wildcards
    $likePrefix = str_replace(['_', '%'], ['\\_', '\\%'], $prefix);
    $list = rex_list::factory('SELECT id, name FROM ' . rex::getTablePrefix() . 'metainfo_field WHERE `name` LIKE "' . $likePrefix . '%" ORDER BY priority');
    $list->addTableAttribute('class', 'table-striped');
    $tdIcon = '<i class="rex-icon rex-icon-metainfo"></i>';
    $thIcon = '<a href="' . $list->getUrl(['func' => 'add']) . '"><i class="rex-icon rex-icon-add-metainfo"></i></a>';
    $list->addColumn($thIcon, $tdIcon, 0, ['<th class="rex-table-icon">###VALUE###</th>', '<td class="rex-table-icon">###VALUE###</td>']);
    $list->setColumnParams($thIcon, ['func' => 'edit', 'field_id' => '###id###']);
开发者ID:alsahh,项目名称:redaxo,代码行数:31,代码来源:field.php

示例10: get

 /**
  * @return string
  */
 public function get()
 {
     $this->init();
     $this->setApplyUrl($this->getUrl(['func' => ''], false));
     if (($controlElement = $this->getControlElement()) !== null) {
         if ($controlElement->saved()) {
             $this->processPostValues();
             // speichern und umleiten
             // Nachricht in der Liste anzeigen
             if (($result = $this->validate()) === true && ($result = $this->save()) === true) {
                 $this->redirect(rex_i18n::msg('form_saved'));
             } elseif (is_int($result) && isset($this->errorMessages[$result])) {
                 $this->setWarning($this->errorMessages[$result]);
             } elseif (is_string($result) && $result != '') {
                 $this->setWarning($result);
             } else {
                 $this->setWarning(rex_i18n::msg('form_save_error'));
             }
         } elseif ($controlElement->applied()) {
             $this->processPostValues();
             // speichern und wiederanzeigen
             // Nachricht im Formular anzeigen
             if (($result = $this->validate()) === true && ($result = $this->save()) === true) {
                 $this->setMessage(rex_i18n::msg('form_applied'));
             } elseif (is_int($result) && isset($this->errorMessages[$result])) {
                 $this->setWarning($this->errorMessages[$result]);
             } elseif (is_string($result) && $result != '') {
                 $this->setWarning($result);
             } else {
                 $this->setWarning(rex_i18n::msg('form_save_error'));
             }
         } elseif ($controlElement->deleted()) {
             // speichern und wiederanzeigen
             // Nachricht in der Liste anzeigen
             if (($result = $this->delete()) === true) {
                 $this->redirect(rex_i18n::msg('form_deleted'));
             } elseif (is_string($result) && $result != '') {
                 $this->setWarning($result);
             } else {
                 $this->setWarning(rex_i18n::msg('form_delete_error'));
             }
         } elseif ($controlElement->resetted()) {
             // verwerfen und wiederanzeigen
             // Nachricht im Formular anzeigen
             $this->setMessage(rex_i18n::msg('form_resetted'));
         } elseif ($controlElement->aborted()) {
             // verwerfen und umleiten
             // Nachricht in der Liste anzeigen
             $this->redirect(rex_i18n::msg('form_resetted'));
         }
     }
     $actionParams = [];
     if ('get' == strtolower($this->method)) {
         // Parameter dem Formular hinzufügen
         foreach ($this->getParams() as $name => $value) {
             $this->addHiddenField($name, $value, ['internal::useArraySyntax' => 'none']);
         }
     } else {
         $actionParams = $this->getParams();
     }
     $s = "\n";
     $warning = $this->getWarning();
     $message = $this->getMessage();
     if ($warning != '') {
         $s .= '  ' . rex_view::error($warning) . "\n";
     } elseif ($message != '') {
         $s .= '  ' . rex_view::success($message) . "\n";
     }
     $i = 0;
     $addHeaders = true;
     $fieldsets = $this->getFieldsetElements();
     $last = count($fieldsets);
     $s .= '<form id="' . $this->divId . '" action="' . rex_url::backendController($actionParams) . '" method="' . $this->method . '">' . "\n";
     foreach ($fieldsets as $fieldsetName => $fieldsetElements) {
         $s .= '<fieldset>' . "\n";
         if ($fieldsetName != '' && $fieldsetName != $this->name) {
             $s .= '<legend>' . htmlspecialchars($fieldsetName) . '</legend>' . "\n";
         }
         // Die HeaderElemente nur im 1. Fieldset ganz am Anfang einfügen
         if ($i == 0 && $addHeaders) {
             foreach ($this->getHeaderElements() as $element) {
                 // Callback
                 $element->setValue($this->preView($fieldsetName, $element->getFieldName(), $element->getValue()));
                 // HeaderElemente immer ohne <p>
                 $s .= $element->formatElement();
             }
             $addHeaders = false;
         }
         foreach ($fieldsetElements as $element) {
             // Callback
             $element->setValue($this->preView($fieldsetName, $element->getFieldName(), $element->getValue()));
             $s .= $element->get();
         }
         // Die FooterElemente nur innerhalb des letzten Fieldsets
         if ($i + 1 == $last) {
             foreach ($this->getFooterElements() as $element) {
                 // Callback
//.........这里部分代码省略.........
开发者ID:staabm,项目名称:redaxo,代码行数:101,代码来源:form.php

示例11: rex_request

 $revisions = [];
 $revisions[0] = rex_i18n::msg('version_liveversion');
 $revisions[1] = rex_i18n::msg('version_workingversion');
 $version_id = rex_request('rex_set_version', 'int', '-1');
 if ($version_id === 0) {
     $rex_version_article[$params['article_id']] = 0;
 } elseif ($version_id == 1) {
     $rex_version_article[$params['article_id']] = 1;
 } elseif (!isset($rex_version_article[$params['article_id']])) {
     $rex_version_article[$params['article_id']] = 1;
 }
 $func = rex_request('rex_version_func', 'string');
 switch ($func) {
     case 'copy_work_to_live':
         if ($working_version_empty) {
             $return .= rex_view::error(rex_i18n::msg('version_warning_working_version_to_live'));
         } elseif (rex::getUser()->hasPerm('version[live_version]')) {
             rex_article_revision::copyContent($params['article_id'], $params['clang'], rex_article_revision::WORK, rex_article_revision::LIVE);
             $return .= rex_view::success(rex_i18n::msg('version_info_working_version_to_live'));
         }
         break;
     case 'copy_live_to_work':
         rex_article_revision::copyContent($params['article_id'], $params['clang'], rex_article_revision::LIVE, rex_article_revision::WORK);
         $return .= rex_view::success(rex_i18n::msg('version_info_live_version_to_working'));
         break;
 }
 if (!rex::getUser()->hasPerm('version[live_version]')) {
     $rex_version_article[$params['article_id']] = 1;
     unset($revisions[0]);
 }
 rex::getProperty('login')->setSessionVar('rex_version_article', $rex_version_article);
开发者ID:eaCe,项目名称:redaxo,代码行数:31,代码来源:boot.php

示例12: rex_request

<?php

/** @var rex_addon $this */
$addonkey = rex_request('addonkey', 'string');
$addons = [];
echo rex_api_function::getMessage();
try {
    $addons = rex_install_packages::getMyPackages();
} catch (rex_functional_exception $e) {
    echo rex_view::error($e->getMessage());
    $addonkey = '';
}
if ($addonkey && isset($addons[$addonkey])) {
    $addon = $addons[$addonkey];
    $file_id = rex_request('file', 'string');
    if ($file_id) {
        $new = $file_id == 'new';
        $file = $new ? ['version' => '', 'description' => '', 'status' => 1] : $addon['files'][$file_id];
        $newVersion = rex_addon::get($addonkey)->getVersion();
        $uploadCheckboxDisabled = '';
        $hiddenField = '';
        if ($new || !rex_addon::exists($addonkey)) {
            $uploadCheckboxDisabled = ' disabled="disabled"';
            $hiddenField = '<input type="hidden" name="upload[upload_file]" value="' . (int) $new . '" />';
        }
        $panel = '<fieldset>';
        $formElements = [];
        $n = [];
        $n['label'] = '<label for="rex-js-install-packages-upload-version">' . $this->i18n('version') . '</label>';
        $n['field'] = '<p class="form-control-static" id="rex-js-install-packages-upload-version">' . ($new ? $newVersion : $file['version']) . '</p>
                           <input type="hidden" name="upload[oldversion]" value="' . $file['version'] . '" />';
开发者ID:DECAF,项目名称:redaxo,代码行数:31,代码来源:packages.upload.php

示例13: foreach

}
// --------------------------------------------- Rechte prüfen
$KATPERM = rex::getUser()->getComplexPerm('structure')->hasCategoryPerm($category_id);
$stop = false;
if (rex_clang::count() > 1) {
    if (!rex::getUser()->getComplexPerm('clang')->hasPerm($clang)) {
        $stop = true;
        foreach (rex_clang::getAllIds() as $key) {
            if (rex::getUser()->getComplexPerm('clang')->hasPerm($key)) {
                $clang = $key;
                $stop = false;
                break;
            }
        }
        if ($stop) {
            echo rex_view::error('You have no permission to this area');
            exit;
        }
    }
} else {
    $clang = rex_clang::getStartId();
}
$context = new rex_context(['page' => 'structure', 'category_id' => $category_id, 'article_id' => $article_id, 'clang' => $clang]);
// --------------------- Extension Point
echo rex_extension::registerPoint(new rex_extension_point('PAGE_STRUCTURE_HEADER_PRE', '', ['context' => $context]));
// --------------------------------------------- TITLE
echo rex_view::title(rex_i18n::msg('title_structure'));
// --------------------------------------------- Languages
echo rex_view::clangSwitchAsButtons($context);
// --------------------------------------------- Path
require __DIR__ . '/../functions/function_rex_category.php';
开发者ID:DECAF,项目名称:redaxo,代码行数:31,代码来源:index.php

示例14:

                $error = $return['message'];
            }
            // temp datei löschen
            if ($impname == '') {
                rex_file::delete($file_temp);
            }
        } else {
            $error = rex_i18n::msg('backup_file_could_not_be_uploaded') . ' ' . rex_i18n::msg('backup_you_have_no_write_permission_in', 'data/addons/backup/') . ' <br>';
        }
    }
}
if ($success != '') {
    echo rex_view::success($success);
}
if ($error != '') {
    echo rex_view::error($error);
}
$fragment = new rex_fragment();
$fragment->setVar('class', 'info');
$fragment->setVar('title', rex_i18n::msg('backup_note'), false);
$fragment->setVar('body', '<p>' . rex_i18n::msg('backup_intro_import') . '</p>', false);
echo $fragment->parse('core/page/section.php');
$content = '<table class="table table-striped table-hover">
                <thead>
                    <tr>
                        <th class="rex-table-icon"></th>
                        <th>' . rex_i18n::msg('backup_filename') . '</th>
                        <th class="rex-table-width-5">' . rex_i18n::msg('backup_filesize') . '</th>
                        <th class="rex-table-width-5">' . rex_i18n::msg('backup_createdate') . '</th>
                        <th class="rex-table-action" colspan="3">' . rex_i18n::msg('backup_function') . '</th>
                    </tr>
开发者ID:alsahh,项目名称:redaxo,代码行数:31,代码来源:import.server.php

示例15: rex_post

<?php

/**
 * @package redaxo5
 */
global $rex_user_loginmessage;
$rex_user_login = rex_post('rex_user_login', 'string');
echo rex_view::title(rex_i18n::msg('login'));
$js = '';
if ($rex_user_loginmessage != '') {
    echo rex_view::error($rex_user_loginmessage) . "\n";
    $js = '
        var time_el = $("div.rex-message strong[data-time]");
        if(time_el.length == 1) {
            function disableLogin() {
                var time = time_el.attr("data-time");
                time_el.attr("data-time", time - 1);
                var hours = Math.floor(time / 3600);
                var mins  = Math.floor((time - (hours * 3600)) / 60);
                var secs  = time % 60;
                var formatted = (hours ? hours + "h " : "") + (hours || mins ? mins + "min " : "") + secs + "s";
                time_el.html(formatted);
                if(time > 0) {
                    setTimeout(disableLogin, 1000);
                } else {
                    $("div.rex-message div").html("' . rex_i18n::msg('login_welcome') . '");
                    $("#rex-form-login").find(":input:not(:hidden)").prop("disabled", "");
                    $("#rex-id-login-user").focus();
                }
            };
            $("#rex-form-login").find(":input:not(:hidden)").prop("disabled", "disabled");
开发者ID:skerbis,项目名称:redaxo,代码行数:31,代码来源:login.php


注:本文中的rex_view::error方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。