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


PHP getStringFromRequest函数代码示例

本文整理汇总了PHP中getStringFromRequest函数的典型用法代码示例。如果您正苦于以下问题:PHP getStringFromRequest函数的具体用法?PHP getStringFromRequest怎么用?PHP getStringFromRequest使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: getStringFromRequest

    $newemail = getStringFromRequest('newemail');
    if (!validate_email($newemail)) {
        form_release_key(getStringFromRequest('form_key'));
        exit_error(_('Error'), _('Invalid email address.'));
    }
    $confirm_hash = substr(md5($session_hash . time()), 0, 16);
    $u =& user_get_object(user_getid());
    if (!$u || !is_object($u)) {
        form_release_key(getStringFromRequest('form_key'));
        exit_error('Error', 'Could Not Get User');
    } elseif ($u->isError()) {
        form_release_key(getStringFromRequest('form_key'));
        exit_error('Error', $u->getErrorMessage());
    }
    if (!$u->setNewEmailAndHash($newemail, $confirm_hash)) {
        form_release_key(getStringFromRequest('form_key'));
        exit_error('Could Not Complete Operation', $u->getErrorMessage());
    }
    $message = stripcslashes(sprintf(_('You have requested a change of email address on %1$s.
Please visit the following URL to complete the email change:

%2$s

 -- the %1$s staff'), $GLOBALS['sys_name'], util_make_url('/account/change_email-complete.php?ch=_' . $confirm_hash)));
    util_send_message($newemail, sprintf(_('%1$s Verification'), $GLOBALS['sys_name']), $message);
    site_user_header(array('title' => _('Email Change Confirmation')));
    printf(_('<p>An email has been sent to the new address. Follow the instructions in the email to complete the email change. </p><a href="%1$s">[ Home ]</a>'), util_make_url('/'));
    site_user_footer(array());
    exit;
}
site_user_header(array('title' => _('Email change')));
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:change_email.php

示例2: CallHook

 function CallHook($hookname, $params)
 {
     global $use_cvssyncmailplugin, $G_SESSION, $HTML;
     $group_id = $params['group'];
     if ($hookname == "groupisactivecheckbox") {
         $group =& group_get_object($group_id);
         if ($group->usesPlugin('scmcvs')) {
             //Check if the group is active
             // this code creates the checkbox in the project edit public info page to activate/deactivate the plugin
             echo "<tr>";
             echo "<td>";
             echo ' <input type="CHECKBOX" name="use_cvssyncmailplugin" value="1" ';
             // CHECKED OR UNCHECKED?
             if ($group->usesPlugin($this->name)) {
                 echo "CHECKED";
             }
             echo "><br/>";
             echo "</td>";
             echo "<td>";
             echo "<strong>Use " . $this->text . " Plugin</strong>";
             echo "</td>";
             echo "</tr>";
         }
     } elseif ($hookname == "groupisactivecheckboxpost") {
         // this code actually activates/deactivates the plugin after the form was submitted in the project edit public info page
         $group =& group_get_object($group_id);
         $use_cvssyncmailplugin = getStringFromRequest('use_cvssyncmailplugin');
         if ($use_cvssyncmailplugin == 1) {
             $group->setPluginUse($this->name);
         } else {
             $group->setPluginUse($this->name, false);
         }
     }
 }
开发者ID:neymanna,项目名称:fusionforge,代码行数:34,代码来源:CVSSyncMailPlugin.class.php

示例3: header

 function header($params)
 {
     global $DOCUMENT_ROOT, $HTML, $group_id;
     use_javascript('/js/sortable.js');
     html_use_jquery();
     $params['toptab'] = 'taskboard';
     $params['group'] = $group_id;
     $labels[] = _("View Taskboard");
     $links[] = '/plugins/taskboard/index.php?group_id=' . $group_id;
     if (session_loggedin()) {
         if (forge_check_perm('tracker', $this->getID(), 'manager')) {
             $labels[] = _('Administration');
             $links[] = '/plugins/taskboard/admin/index.php?group_id=' . $group_id;
             $action = getStringFromRequest('action');
             if ($action == 'edit_column') {
                 $labels[] = _('Configure Columns');
                 $links[] = '/plugins/taskboard/admin/index.php?group_id=' . $group_id . '&action=columns';
                 $column_id = getStringFromRequest('column_id', '');
                 if ($column_id) {
                     $labels[] = _('Delete Column');
                     $links[] = '/plugins/taskboard/admin/index.php?group_id=' . $group_id . '&action=delete_column&column_id=' . $column_id;
                 }
             }
         }
     }
     $params['submenu'] = $HTML->subMenu($labels, $links);
     site_project_header($params);
 }
开发者ID:vpylypv,项目名称:taskboard,代码行数:28,代码来源:TaskBoardHtml.class.php

示例4: admin_table_postadd

/**
 *	admin_table_postadd() - update the database based on a submitted change
 *
 *	@param $table - the table to act on
 *	@param $unit - the name of the "units" described by the table's records
 *	@param $primary_key - the primary key of the table
 */
function admin_table_postadd($table, $unit, $primary_key)
{
    if (!form_key_is_valid(getStringFromRequest('form_key'))) {
        exit_form_double_submit();
    }
    $field_list = getStringFromRequest('__fields__');
    $fields = split(",", $field_list);
    $values = array();
    foreach ($fields as $field) {
        $values[] = "'" . getStringFromPost($field) . "'";
    }
    $sql = "INSERT INTO {$table} (" . $field_list . ") VALUES (" . implode(",", $values) . ")";
    if (db_query($sql)) {
        printf(_('%1$s successfully added.'), ucfirst(getUnitLabel($unit)));
    } else {
        form_release_key(getStringFromRequest('form_key'));
        echo db_error();
    }
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:26,代码来源:admin_table.php

示例5: elseif

        $aq->makeDefault();
        $query_id = $aq->getID();
        //
        //	Just load the query
        //
    } elseif ($query_action == 4) {
        $aq = new ArtifactQuery($ath, $query_id);
        if (!$aq || !is_object($aq)) {
            exit_error('Error', $aq->getErrorMessage());
        }
        $aq->makeDefault();
        //
        //	Delete the query
        //
    } elseif ($query_action == 5) {
        if (!form_key_is_valid(getStringFromRequest('form_key'))) {
            exit_form_double_submit();
        }
        $aq = new ArtifactQuery($ath, $query_id);
        if (!$aq || !is_object($aq)) {
            exit_error('Error', $aq->getErrorMessage());
        }
        if (!$aq->delete()) {
            $feedback .= $aq->getErrorMessage();
        } else {
            $feedback .= 'Query Deleted';
        }
        $query_id = 0;
    }
} else {
    $user = session_get_user();
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:query.php

示例6: getStringFromServer

	<body>
	<h2>XML Parser</h2>
	<p>
	<form name="xmlparser" method="POST" action="<?php 
    echo getStringFromServer('PHP_SELF');
    ?>
">
	Text: <br>
	<textarea name="document" cols="50" rows="10"></textarea>
	<br>
	<input type="hidden" name="parser" value="yes">
	<input type="submit" value="Parser">
	</form>
	<?php 
} elseif (getStringFromRequest("parser") == "yes") {
    $data = getStringFromRequest("document");
    //$data = str$data);
} else {
    $ph = fopen("php://input", "rb");
    while (!feof($ph)) {
        $data .= fread($ph, 4096);
    }
    //$data=addslashes($data);
}
if (!$data) {
    echo "No Data";
    exit;
}
//printr($data,'initial-data');
// SECTION 1. DEBUG XML
//$data = stripslashes($data);
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:xmlparser.php

示例7: exit_error

         exit_error(_('error - missing info'), _('Fill in all required fields'));
     }
     if (people_verify_job_group($job_id, $group_id)) {
         $sql = "UPDATE people_job_inventory SET skill_level_id='{$skill_level_id}',skill_year_id='{$skill_year_id}' " . "WHERE job_id='{$job_id}' AND job_inventory_id='{$job_inventory_id}'";
         $result = db_query($sql);
         if (!$result || db_affected_rows($result) < 1) {
             $feedback .= _('JOB skill update FAILED');
             echo db_error();
         } else {
             $feedback .= _('JOB skill updated successfully');
         }
     } else {
         $feedback .= _('JOB skill update failed - wrong project_id');
     }
 } else {
     if (getStringFromRequest('delete_from_job_inventory')) {
         /*
         	remove this skill from this job
         */
         if (!$job_id) {
             //required info
             exit_error(_('error - missing info'), _('Fill in all required fields'));
         }
         if (people_verify_job_group($job_id, $group_id)) {
             $sql = "DELETE FROM people_job_inventory WHERE job_id='{$job_id}' AND job_inventory_id='{$job_inventory_id}'";
             $result = db_query($sql);
             if (!$result || db_affected_rows($result) < 1) {
                 $feedback .= _('JOB skill delete FAILED');
                 echo db_error();
             } else {
                 $feedback .= _('JOB skill deleted successfully');
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:editjob.php

示例8: _

    echo _('Edit');
    ?>
" name="submit" /></td>
		</tr>
	</table>
	<p>
		 <?php 
    echo _('Group name will be used as a title, so it should be formatted correspondingly.');
    ?>

	</p>
	</form>
	<?php 
    docman_footer(array());
} else {
    if (getStringFromRequest('deletedoc') && $docid) {
        $d = new Document($g, $docid);
        if ($d->isError()) {
            exit_error('Error', $d->getErrorMessage());
        }
        docman_header(_('Document Manager Administration'), _('Edit Groups'), '');
        ?>
		<p>
		<form action="<?php 
        echo $PHP_SELF . '?deletedoc=1&amp;docid=' . $d->getID() . '&amp;group_id=' . $d->Group->getID();
        ?>
" method="post">
		<input type="hidden" name="submit" value="1" /><br />
		<?php 
        echo _('You are about to permanently delete this document.');
        ?>
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:index.php

示例9: forum_footer

            forum_footer(array());
        } else {
            exit_permission_denied();
        }
    } else {
        //		if ($forum_id=="A") {
        //all messages
        //			if (!$fa->isGroupAdmin()) {
        //				exit_permission_denied();
        //			}
        //		} else {
        if (!$fa->isForumAdmin($forum_id)) {
            exit_permission_denied();
        }
        //		}
        forum_header(array('title' => _('Forums: Administration')));
        if (getStringFromRequest("Go")) {
            $fa->ExecuteAction("view_pending");
        } else {
            $fa->ExecuteAction($action);
        }
        forum_footer(array());
    }
} else {
    //manage auth errors
    if ($fa->isGroupIdError()) {
        exit_no_group();
    } elseif ($fa->isPermissionDeniedError()) {
        exit_permission_denied();
    }
}
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:pending.php

示例10: getStringFromRequest

/**
 *
 * SourceForge Sitewide Statistics
 *
 * SourceForge: Breaking Down the Barriers to Open Source Development
 * Copyright 1999-2001 (c) VA Linux Systems
 * http://sourceforge.net
 *
 * @version   $Id$
 *
 */
require_once '../env.inc.php';
require_once $gfwww . 'include/pre.php';
require_once $gfwww . 'stats/site_stats_utils.php';
$report = getStringFromRequest('report');
$orderby = getStringFromRequest('orderby');
$projects = getIntFromRequest('projects');
$trovecatid = getIntFromRequest('trovecatid');
// require you to be a member of the sfstats group (group_id = 11084)
session_require(array('group' => $sys_stats_group));
$HTML->header(array('title' => sprintf(_('%1$s Site Statistics'), $GLOBALS['sys_name'])));
?>
<div align="center">
<h3><?php 
echo _('Project Statistical Comparisons');
?>
</h3><br />
</div>

<hr />
开发者ID:neymanna,项目名称:fusionforge,代码行数:30,代码来源:projects.php

示例11: getIntFromRequest

     $form_userid = getIntFromRequest('form_userid');
     $form_unix_name = getStringFromRequest('form_unix_name');
     $role_id = getIntFromRequest('role_id');
     if (!$group->addUser($form_unix_name, $role_id)) {
         $feedback .= $group->getErrorMessage();
     } else {
         $gjr = new GroupJoinRequest($group, $form_userid);
         if (!$gjr || !is_object($gjr) || $gjr->isError()) {
             $feedback .= 'Error Getting GroupJoinRequest';
         } else {
             $gjr->send_accept_mail();
             $gjr->delete(true);
         }
         $feedback = _('User Added Successfully');
     }
 } elseif (getStringFromRequest('rejectpending')) {
     /*
     	reject adding user to this project
     */
     $form_userid = getIntFromRequest('form_userid');
     $gjr = new GroupJoinRequest($group, $form_userid);
     if (!$gjr || !is_object($gjr) || $gjr->isError()) {
         $feedback .= 'Error Getting GroupJoinRequest';
     } else {
         if (!$gjr->reject()) {
             exit_error('Error', $gjr->getErrorMessage());
         } else {
             $feedback .= 'Rejected';
         }
     }
 }
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:index.php

示例12: _

	<p />
	<strong><?php 
    echo _('Send All Updates To');
    ?>
:</strong><br />
	<input type="text" name="send_all_posts_to" value="" size="40" maxlength="80" /><br />
	<p />
	<input type="submit" name="submit" value="<?php 
    echo _('Submit');
    ?>
" />
	</form>
	<?php 
    pm_footer(array());
} else {
    if (getStringFromRequest('update_pg') && $group_project_id) {
        $pg = new ProjectGroup($g, $group_project_id);
        if (!$pg || !is_object($pg)) {
            exit_error('Error', 'Could Not Get ProjectGroup');
        } elseif ($pg->isError()) {
            exit_error('Error', $pg->getErrorMessage());
        }
        if (!$pg->userIsAdmin()) {
            exit_permission_denied();
        }
        pm_header(array('title' => _('Change Project/Task Manager Status')));
        ?>
	<p><?php 
        echo _('You can modify an existing Project using this form. Please note that private projects can still be viewed by members of your project, but not the general public.');
        ?>
</p>
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:index.php

示例13: CallHook

 function CallHook($hookname, &$params)
 {
     if (isset($params['group_id'])) {
         $group_id = $params['group_id'];
     } elseif (isset($params['group'])) {
         $group_id = $params['group'];
     } else {
         $group_id = null;
     }
     if ($hookname == "groupmenu") {
         $project = group_get_object($group_id);
         if (!$project || !is_object($project)) {
             return;
         }
         if ($project->isError()) {
             return;
         }
         if (!$project->isProject()) {
             return;
         }
         if ($project->usesPlugin($this->name)) {
             $params['TITLES'][] = $this->text;
             $params['DIRS'][] = util_make_url('/plugins/mediawiki/wiki/' . $project->getUnixName() . '/index.php');
             $params['ADMIN'][] = '';
             $params['TOOLTIPS'][] = _('Mediawiki Space');
         }
         $params['toptab'] == $this->name ? $params['selected'] = count($params['TITLES']) - 1 : '';
     } elseif ($hookname == "groupisactivecheckbox") {
         //Check if the group is active
         // this code creates the checkbox in the project edit public info page to activate/deactivate the plugin
         $group = group_get_object($group_id);
         echo "<tr>";
         echo "<td>";
         echo ' <input type="checkbox" name="use_mediawikiplugin" value="1" ';
         // checked or unchecked?
         if ($group->usesPlugin($this->name)) {
             echo "checked";
         }
         echo " /><br/>";
         echo "</td>";
         echo "<td>";
         echo "<strong>Use " . $this->text . " Plugin</strong>";
         echo "</td>";
         echo "</tr>";
     } elseif ($hookname == "groupisactivecheckboxpost") {
         // this code actually activates/deactivates the plugin after the form was submitted in the project edit public info page
         $group = group_get_object($group_id);
         $use_mediawikiplugin = getStringFromRequest('use_mediawikiplugin');
         if ($use_mediawikiplugin == 1) {
             $group->setPluginUse($this->name);
         } else {
             $group->setPluginUse($this->name, false);
         }
     } elseif ($hookname == "project_public_area") {
         $project = group_get_object($group_id);
         if (!$project || !is_object($project)) {
             return;
         }
         if ($project->isError()) {
             return;
         }
         if (!$project->isProject()) {
             return;
         }
         if ($project->usesPlugin($this->name)) {
             echo '<div class="public-area-box">';
             print '<a href="' . util_make_url('/plugins/mediawiki/wiki/' . $project->getUnixName() . '/index.php') . '">';
             print html_abs_image(util_make_url('/plugins/mediawiki/wiki/' . $project->getUnixName() . '/skins/fusionforge/wiki.png'), '20', '20', array('alt' => 'Mediawiki'));
             print ' Mediawiki';
             print '</a>';
             echo '</div>';
         }
     } elseif ($hookname == "role_get") {
         $role =& $params['role'];
         // Read access
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_read');
         $right->SetAllowedValues(array('0', '1'));
         $right->SetDefaultValues(array('Admin' => '1', 'Senior Developer' => '1', 'Junior Developer' => '1', 'Doc Writer' => '1', 'Support Tech' => '1'));
         // Edit privileges
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_edit');
         $right->SetAllowedValues(array('0', '1', '2', '3'));
         $right->SetDefaultValues(array('Admin' => '3', 'Senior Developer' => '2', 'Junior Developer' => '1', 'Doc Writer' => '3', 'Support Tech' => '0'));
         // File upload privileges
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_upload');
         $right->SetAllowedValues(array('0', '1', '2'));
         $right->SetDefaultValues(array('Admin' => '2', 'Senior Developer' => '2', 'Junior Developer' => '1', 'Doc Writer' => '2', 'Support Tech' => '0'));
         // Administrative tasks
         $right = new PluginSpecificRoleSetting($role, 'plugin_mediawiki_admin');
         $right->SetAllowedValues(array('0', '1'));
         $right->SetDefaultValues(array('Admin' => '1', 'Senior Developer' => '0', 'Junior Developer' => '0', 'Doc Writer' => '0', 'Support Tech' => '0'));
     } elseif ($hookname == "role_normalize") {
         $role =& $params['role'];
         $new_sa =& $params['new_sa'];
         $new_pa =& $params['new_pa'];
         $projects = $role->getLinkedProjects();
         foreach ($projects as $p) {
             $role->normalizePermsForSection($new_pa, 'plugin_mediawiki_read', $p->getID());
             $role->normalizePermsForSection($new_pa, 'plugin_mediawiki_edit', $p->getID());
             $role->normalizePermsForSection($new_pa, 'plugin_mediawiki_upload', $p->getID());
             $role->normalizePermsForSection($new_pa, 'plugin_mediawiki_admin', $p->getID());
//.........这里部分代码省略.........
开发者ID:pombredanne,项目名称:tuleap,代码行数:101,代码来源:mediawikiPlugin.class.php

示例14: site_admin_header

 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with GForge; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
require_once '../env.inc.php';
require_once $gfwww . 'include/pre.php';
require_once $gfwww . 'admin/admin_utils.php';
site_admin_header(array('title' => _('Group List')));
$form_catroot = getStringFromRequest('form_catroot');
$form_pending = getStringFromRequest('form_pending');
$sortorder = getStringFromRequest('sortorder');
$group_name_search = getStringFromRequest('group_name_search');
$status = getStringFromRequest('status');
// start from root if root not passed in
if (!$form_catroot) {
    $form_catroot = 1;
}
if (!isset($sortorder) || empty($sortorder)) {
    $sortorder = "group_name";
}
if ($form_catroot == 1) {
    if (isset($group_name_search)) {
        echo "<p>" . _('Groups that begin with') . " <strong>" . $group_name_search . "</strong></p>\n";
        $sql = "SELECT group_name,register_time,unix_group_name,groups.group_id,is_public,status,license_name,COUNT(user_group.group_id) AS members ";
        if ($sys_database_type == "mysql") {
            $sql .= "FROM groups LEFT JOIN user_group ON user_group.group_id=groups.group_id, licenses WHERE license_id=license AND group_name LIKE '{$group_name_search}%' ";
        } else {
            $sql .= "FROM groups LEFT JOIN user_group ON user_group.group_id=groups.group_id, licenses WHERE license_id=license AND group_name ILIKE '{$group_name_search}%' ";
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:grouplist.php

示例15: getStringFromRequest

        }
    }
}
// Edit/Delete files in a release
if (getStringFromRequest('step3')) {
    $step3 = getStringFromRequest('step3');
    $file_id = getIntFromRequest('file_id');
    $processor_id = getIntFromRequest('processor_id');
    $type_id = getIntFromRequest('type_id');
    $new_release_id = getIntFromRequest('new_release_id');
    $release_time = getStringFromRequest('release_time');
    $group_id = getIntFromRequest('group_id');
    $release_id = getIntFromRequest('release_id');
    $package_id = getIntFromRequest('package_id');
    $file_id = getIntFromRequest('file_id');
    $im_sure = getStringFromRequest('im_sure');
    // If the user chose to delete the file and he's sure then delete the file
    if ($step3 == "Delete File") {
        if ($im_sure) {
            $frsf = new FRSFile($frsr, $file_id);
            if (!$frsf || !is_object($frsf)) {
                exit_error('Error', 'Could Not Get FRSFile');
            } elseif ($frsf->isError()) {
                exit_error('Error', $frsf->getErrorMessage());
            } else {
                if (!$frsf->delete()) {
                    exit_error('Error', $frsf->getErrorMessage());
                } else {
                    $feedback .= _('File Deleted');
                }
            }
开发者ID:neymanna,项目名称:fusionforge,代码行数:31,代码来源:editrelease.php


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