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


PHP Input::GetErrorString方法代码示例

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


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

示例1: require_once

<?php
require_once($GLOBALS['g_campsiteDir']."/$ADMIN_DIR/issues/issue_common.php");

// Check permissions
if (!$g_user->hasPermission('ManageIssue')) {
	camp_html_display_error(getGS('You do not have the right to add issues.'));
	exit;
}

$Pub = Input::Get('Pub', 'int');
if (!Input::IsValid()) {
	camp_html_display_error(getGS('Invalid Input: $1', Input::GetErrorString()));
	exit;
}
$publicationObj = new Publication($Pub);
$allLanguages = Language::GetLanguages(null, null, null, array(), array(), true);
$newIssueId = Issue::GetUnusedIssueId($Pub);
$lastCreatedIssue = Issue::GetLastCreatedIssue($Pub);

include_once($GLOBALS['g_campsiteDir']."/$ADMIN_DIR/javascript_common.php");

camp_html_content_top(getGS('Copy previous issue'), array('Pub' => $publicationObj), true, true, array(getGS("Issues") => "/$ADMIN/issues/?Pub=$Pub"));


if (is_null($lastCreatedIssue)) { ?>
    <BLOCKQUOTE>
	<LI><?php  putGS('No previous issue.'); ?></LI>
    </BLOCKQUOTE>
    <?php
} else {
	camp_html_display_msgs();
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:add_prev.php

示例2: camp_html_display_error

    camp_html_display_error($translator->trans("You do not have the right to add sections.", array(), 'sections'));
    exit;
}
if (!$g_user->hasPermission("AddArticle")) {
    camp_html_display_error($translator->trans("You do not have the right to add articles."));
    exit;
}
$f_src_publication_id = Input::Get('f_src_publication_id', 'int', 0);
$f_src_issue_number = Input::Get('f_src_issue_number', 'int', 0);
$f_src_section_number = Input::Get('f_src_section_number', 'int', 0);
$f_language_id = Input::Get('f_language_id', 'int', 0);
$f_dest_publication_id = Input::Get('f_dest_publication_id', 'int', 0);
$f_dest_issue_number = Input::Get('f_dest_issue_number', 'int', 0);
$f_dest_section_number = Input::Get('f_dest_section_number', 'int', 0);
if (!Input::IsValid()) {
    camp_html_display_error($translator->trans('Invalid input: $1', array('$1' => Input::GetErrorString())));
    exit;
}
$srcPublicationObj = new Publication($f_src_publication_id);
if (!$srcPublicationObj->exists()) {
    camp_html_display_error($translator->trans('Publication does not exist.'));
    exit;
}
$srcIssueObj = new Issue($f_src_publication_id, $f_language_id, $f_src_issue_number);
if (!$srcIssueObj->exists()) {
    camp_html_display_error($translator->trans('Issue does not exist.'));
    exit;
}
$srcSectionObj = new Section($f_src_publication_id, $f_src_issue_number, $f_language_id, $f_src_section_number);
if (!$srcSectionObj->exists()) {
    camp_html_display_error($translator->trans('Section does not exist.'));
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:duplicate_complete.php

示例3: camp_session_get

<?php

require_once $GLOBALS['g_campsiteDir'] . "/{$ADMIN_DIR}/sections/section_common.php";
require_once $GLOBALS['g_campsiteDir'] . '/classes/SimplePager.php';
$translator = \Zend_Registry::get('container')->getService('translator');
$Pub = Input::Get('Pub', 'int', 0);
$Issue = Input::Get('Issue', 'int', 0);
$Language = Input::Get('Language', 'int', 0);
$SectOffs = camp_session_get("SectOffs_" . $Pub . "_" . $Issue . "_" . $Language, 0);
if ($SectOffs < 0) {
    $SectOffs = 0;
}
$ItemsPerPage = 15;
if (!Input::IsValid()) {
    camp_html_display_error($translator->trans('Invalid input: $1', array('$1' => Input::GetErrorString())), $_SERVER['REQUEST_URI']);
    exit;
}
$publicationObj = new Publication($Pub);
$issueObj = new Issue($Pub, $Language, $Issue);
$allSections = Section::GetSections($Pub, $Issue, $Language, null, null, array('ORDER BY' => 'Number', 'LIMIT' => array('START' => $SectOffs, 'MAX_ROWS' => $ItemsPerPage)), true);
$totalSections = Section::GetTotalSections($Pub, $Issue, $Language);
$pager = new SimplePager($totalSections, $ItemsPerPage, "SectOffs_" . $Pub . "_" . $Issue . "_" . $Language, "index.php?Pub={$Pub}&Issue={$Issue}&Language={$Language}&");
$topArray = array('Pub' => $publicationObj, 'Issue' => $issueObj);
camp_html_content_top($translator->trans('Section List'), $topArray);
$controller->view->headTitle($translator->trans('Section List') . ' - Newscoop Admin', 'SET');
?>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1" class="action_buttons" style="padding-top: 5px;">
<TR>
	<TD><A HREF="/<?php 
echo $ADMIN;
?>
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:index.php

示例4: trim

$cDescription = trim(Input::Get('cDescription'));
$cSectionTplId = Input::Get('cSectionTplId', 'int', 0);
$cArticleTplId = Input::Get('cArticleTplId', 'int', 0);
$cName = Input::Get('cName');


if ($cSectionTplId < 0) {
    $cSectionTplId = 0;
}

if ($cArticleTplId < 0) {
    $cArticleTplId = 0;
}

if (!Input::IsValid()) {
	camp_html_display_error(getGS('Invalid input: $1', Input::GetErrorString()), $_SERVER['REQUEST_URI']);
	exit;
}

$issueObj = new Issue($Pub, $Language, $Issue);
$publicationObj = new Publication($Pub);
$sectionObj = new Section($Pub, $Issue, $Language, $Section);

if (!$publicationObj->exists()) {
    camp_html_display_error(getGS('Publication does not exist.'));
    exit;
}
if (!$issueObj->exists()) {
	camp_html_display_error(getGS('No such issue.'));
	exit;
}
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:do_edit.php

示例5: list

<?php

require_once $GLOBALS['g_campsiteDir'] . "/{$ADMIN_DIR}/articles/article_common.php";
require_once $GLOBALS['g_campsiteDir'] . '/classes/DbObjectArray.php';
// Optional input parameters
$f_publication_id = Input::Get('f_publication_id', 'int', 0, true);
$f_issue_number = Input::Get('f_issue_number', 'int', 0, true);
$f_section_number = Input::Get('f_section_number', 'int', 0, true);
$f_language_id = Input::Get('f_language_id', 'int', 0, true);
$f_article_code = Input::Get('f_article_code', 'string', 0);
$BackLink = Input::Get('Back', 'string', "/{$ADMIN}/articles/?f_publication_id={$f_publication_id}&f_issue_number={$f_issue_number}&f_section_number={$f_section_number}&f_language_id={$f_language_id}", true);
list($articleNumber, $languageId) = explode("_", $f_article_code);
if (!Input::IsValid()) {
    camp_html_display_error(getGS('Invalid input: $1', Input::GetErrorString()), $BackLink);
    exit;
}
$articleObj = new Article($languageId, $articleNumber);
if (!$articleObj->exists()) {
    camp_html_display_error(getGS('Article does not exist.'), $BackLink);
    exit;
}
$f_publication_id = $f_publication_id > 0 ? $f_publication_id : $articleObj->getPublicationId();
$f_issue_number = $f_issue_number > 0 ? $f_issue_number : $articleObj->getIssueNumber();
$f_section_number = $f_section_number > 0 ? $f_section_number : $articleObj->getSectionNumber();
if ($f_publication_id > 0) {
    $publicationObj = new Publication($f_publication_id);
    if (!$publicationObj->exists()) {
        camp_html_display_error(getGS('Publication does not exist.'), $BackLink);
        exit;
    }
    $issueObj = new Issue($f_publication_id, $f_language_id, $f_issue_number);
开发者ID:nidzix,项目名称:Newscoop,代码行数:31,代码来源:translate.php

示例6: trim

$f_image_photographer = trim(Input::Get('f_image_photographer', 'string', null, true));
$f_image_place = trim(Input::Get('f_image_place', 'string', null, true));
$f_image_date = Input::Get('f_image_date', 'string', null, true);

$backLink = "/$ADMIN/articles/images/edit.php?"
		. "f_publication_id=" . $f_publication_id
		. "&f_issue_number=" . $f_issue_number
		. "&f_section_number=" . $f_section_number
		. "&f_article_number=" . $f_article_number
		. "&f_image_id=" . $f_image_id
		. "&f_language_id=" . $f_language_id
		. "&f_language_selected=" . $f_language_selected
		. "&f_image_template_id=" . $f_orig_image_template_id;

if (!Input::IsValid()) {
	camp_html_display_error(getGS('Invalid input: $1', Input::GetErrorString()), null, true);
	exit;
}

$articleObj = new Article($f_language_selected, $f_article_number);

if (!$g_user->hasPermission('ChangeImage') && !$g_user->hasPermission('AttachImageToArticle')) {
	camp_html_add_msg(getGS("You do not have the right to change image information."));
	camp_html_goto_page(camp_html_article_url($articleObj, $f_language_id, 'edit.php'));
}

$imageObj = new Image($f_image_id);

if (!is_null($f_image_description) && $g_user->hasPermission('ChangeImage')) {
	$attributes = array();
	$attributes['Description'] = $f_image_description;
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:do_edit.php

示例7: stdclass

$data->Results = new stdclass();
$data->Results->f_publication_id = $f_publication_id;
$data->Results->f_issue_number = $f_issue_number;
$data->Results->f_section_number = $f_section_number;
$data->Results->f_language_id = $f_language_id;
$data->Results->f_language_selected = $f_language_selected;
$data->Results->f_article_number = $f_article_number;
$data->Results->f_article_author = $f_article_author;
$data->Results->f_article_author_type = $f_article_author_type;
$data->Results->f_article_title = $f_article_title;
$data->Results->f_message = $f_message;
$data->Results->f_creation_date = $f_creation_date;
$data->Results->f_publish_date = $f_publish_date;
$data->Results->f_comment_status = $f_comment_status;
if (!Input::IsValid()) {
    camp_html_display_error($translator->trans('Invalid input: $1', array('$1' => Input::GetErrorString())), isset($BackLink) ? $Backlink : null);
    exit;
}
// Fetch article
$articleObj = new Article($f_language_selected, $f_article_number);
if (!$articleObj->exists()) {
    camp_html_display_error($translator->trans('No such article.', array(), 'articles'), $BackLink);
    exit;
}
$articleTypeObj = $articleObj->getArticleData();
$dbColumns = $articleTypeObj->getUserDefinedColumns(false, true);
$articleFields = array();
foreach ($dbColumns as $dbColumn) {
    if ($dbColumn->getType() == ArticleTypeField::TYPE_BODY) {
        $dbColumnParam = $dbColumn->getName() . '_' . $f_article_number;
    } else {
开发者ID:alvsgithub,项目名称:Newscoop,代码行数:31,代码来源:post.php

示例8: stdclass

$data->Results = new stdclass();
$data->Results->f_publication_id = $f_publication_id;
$data->Results->f_issue_number = $f_issue_number;
$data->Results->f_section_number = $f_section_number;
$data->Results->f_language_id = $f_language_id;
$data->Results->f_language_selected = $f_language_selected;
$data->Results->f_article_number = $f_article_number;
$data->Results->f_article_author = $f_article_author;
$data->Results->f_article_author_type = $f_article_author_type;
$data->Results->f_article_title = $f_article_title;
$data->Results->f_message = $f_message;
$data->Results->f_creation_date = $f_creation_date;
$data->Results->f_publish_date = $f_publish_date;
$data->Results->f_comment_status = $f_comment_status;
if (!Input::IsValid()) {
    camp_html_display_error(getGS('Invalid input: $1', Input::GetErrorString()), isset($BackLink) ? $Backlink : null);
    exit;
}
// Fetch article
$articleObj = new Article($f_language_selected, $f_article_number);
if (!$articleObj->exists()) {
    camp_html_display_error(getGS('No such article.'), $BackLink);
    exit;
}
$articleTypeObj = $articleObj->getArticleData();
$dbColumns = $articleTypeObj->getUserDefinedColumns(false, true);
$articleFields = array();
foreach ($dbColumns as $dbColumn) {
    if ($dbColumn->getType() == ArticleTypeField::TYPE_BODY) {
        $dbColumnParam = $dbColumn->getName() . '_' . $f_article_number;
    } else {
开发者ID:nidzix,项目名称:Newscoop,代码行数:31,代码来源:post.php

示例9: Translation

		case 4: // UPLOAD_ERR_NO_FILE
			setMessage(getGS("You must select a file to upload."), TRUE);
			break;

		case 6: // UPLOAD_ERR_NO_TMP_DIR
		case 7: // UPLOAD_ERR_CANT_WRITE
			setMessage(getGS("There was a problem uploading the file."), TRUE);
			break;
    }
} else {
	setMessage(getGS("The file exceeds the allowed max file size."), TRUE);
}

if (!Input::IsValid()) {
	setMessage(getGS('Invalid input: $1', Input::GetErrorString()), TRUE);
}

$description = new Translation((int) $f_language_selected);
$description->create($f_description);

$attributes = array();
$attributes['fk_description_id'] = $description->getPhraseId();
$attributes['fk_user_id'] = $g_user->getUserId();
if ($f_language_specific == "yes") {
	$attributes['fk_language_id'] = $f_language_selected;
}
if ($f_content_disposition == "attachment") {
	$attributes['content_disposition'] = "attachment";
}
开发者ID:nistormihai,项目名称:Newscoop,代码行数:29,代码来源:do_add.php

示例10: camp_html_display_error

    camp_html_display_error($translator->trans("You do not have the right to add sections.", array(), 'sections'));
    exit;
}
if (!$g_user->hasPermission("AddArticle")) {
    camp_html_display_error($translator->trans("You do not have the right to add articles."));
    exit;
}
$f_src_publication_id = Input::Get('Pub', 'int', 0);
$f_src_issue_number = Input::Get('Issue', 'int', 0);
$f_src_section_number = Input::Get('Section', 'int', 0);
$f_language_id = Input::Get('Language', 'int', 0);
$f_dest_publication_id = Input::Get('f_dest_publication_id', 'int', 0, true);
$f_dest_issue_number = Input::Get('f_dest_issue_number', 'string', 0, true);
$BackLink = Input::Get('Back', 'string', "/{$ADMIN}/sections/index.php?Pub={$f_src_publication_id}&Issue={$f_src_issue_number}&Language={$f_language_id}", true);
if (!Input::IsValid()) {
    camp_html_display_error($translator->trans("Invalid input: \$1", array('$1' => Input::GetErrorString())), $BackLink);
    exit;
}
$publicationObj = new Publication($f_src_publication_id);
if (!$publicationObj->exists()) {
    camp_html_display_error($translator->trans('Publication does not exist.'));
    exit;
}
$issueObj = new Issue($f_src_publication_id, $f_language_id, $f_src_issue_number);
if (!$issueObj->exists()) {
    camp_html_display_error($translator->trans('Issue does not exist.'));
    exit;
}
$sectionObj = new Section($f_src_publication_id, $f_src_issue_number, $f_language_id, $f_src_section_number);
if (!$sectionObj->exists()) {
    camp_html_display_error($translator->trans('Section does not exist.'));
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:duplicate.php

示例11: setMessage

            // UPLOAD_ERR_NO_FILE
            setMessage($translator->trans("You must select a file to upload.", array(), 'article_files'), TRUE);
            break;
        case 6:
            // UPLOAD_ERR_NO_TMP_DIR
        // UPLOAD_ERR_NO_TMP_DIR
        case 7:
            // UPLOAD_ERR_CANT_WRITE
            setMessage($translator->trans("There was a problem uploading the file.", array(), 'article_files'), TRUE);
            break;
    }
} else {
    setMessage($translator->trans("The file exceeds the allowed max file size.", array(), 'article_files'), TRUE);
}
if (!Input::IsValid()) {
    setMessage($translator->trans('Invalid input: $1', array('$1' => Input::GetErrorString())), TRUE);
}
$container = \Zend_Registry::get('container');
$user = $container->get('security.context')->getToken()->getUser();
$em = $container->get('em');
if (!empty($_FILES['f_file'])) {
    $language = $em->getRepository('Newscoop\\Entity\\Language')->findOneById($f_language_selected);
    $attachmentService = $container->get('attachment');
    $file = new UploadedFile($_FILES['f_file']['tmp_name'], $_FILES['f_file']['name'], $_FILES['f_file']['type'], $_FILES['f_file']['size'], null, true);
    $attachment = $attachmentService->upload($file, $f_description, $language, array('user' => $user));
    if ($f_language_specific != "yes") {
        $queryBuilder = $em->createQueryBuilder();
        $attach = $queryBuilder->update('Newscoop\\Entity\\Attachment', 'a')->set('a.language', 'null')->where('a.id = ?1')->setParameter(1, $attachment->getId())->getQuery();
        $attach->execute();
    }
    if ($f_content_disposition == "attachment") {
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:do_add.php


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