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


PHP dPgetParam函数代码示例

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


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

示例1: resource_presave

/**
 * presave functions are called before the session storage of tab data
 * is destroyed.  It can be used to save this data to be used later in
 * the postsave function.
 */
function resource_presave()
{
    global $other_resources;
    //check to see if we are in the post save list or if we need to query the session.
    $other_resources = dPgetParam($_POST, 'hresource_assign');
    dprint(__FILE__, __LINE__, 5, "setting other resources to {$other_resources}");
}
开发者ID:illuminate3,项目名称:dotproject,代码行数:12,代码来源:tasks_dosql.addedit.php

示例2: sendNewPass

function sendNewPass()
{
    global $AppUI;
    $_live_site = dPgetConfig('base_url');
    $_sitename = dPgetConfig('company_name');
    // ensure no malicous sql gets past
    $checkusername = trim(dPgetParam($_POST, 'checkusername', ''));
    $checkusername = db_escape($checkusername);
    $confirmEmail = trim(dPgetParam($_POST, 'checkemail', ''));
    $confirmEmail = mb_strtolower(db_escape($confirmEmail));
    $q = new DBQuery();
    $q->addTable('users', 'u');
    $q->addQuery('u.user_id');
    $q->addWhere('user_username=\'' . $checkusername . '\' AND LOWER(contact_email)=\'' . $confirmEmail . '\'');
    $q->leftJoin('contacts', 'c', 'u.user_contact = c.contact_id');
    if (!($user_id = $q->loadResult()) || !$checkusername || !$confirmEmail) {
        $AppUI->setMsg('Invalid username or email.', UI_MSG_ERROR);
        $AppUI->redirect();
    }
    $newpass = makePass();
    $message = $AppUI->_('sendpass0', UI_OUTPUT_RAW) . ' ' . $checkusername . ' ' . $AppUI->_('sendpass1', UI_OUTPUT_RAW) . ' ' . $_live_site . ' ' . $AppUI->_('sendpass2', UI_OUTPUT_RAW) . ' ' . $newpass . ' ' . $AppUI->_('sendpass3', UI_OUTPUT_RAW);
    $subject = "{$_sitename} :: " . $AppUI->_('sendpass4', UI_OUTPUT_RAW) . " - {$checkusername}";
    $m = new Mail();
    // create the mail
    $m->From("dotProject@" . dPgetConfig('site_domain'));
    $m->To($confirmEmail);
    $m->Subject($subject);
    $m->Body($message, isset($GLOBALS['locale_char_set']) ? $GLOBALS['locale_char_set'] : "");
    // set the body
    $m->Send();
    // send the mail
    $newpass = md5($newpass);
    $q->clear();
    $q->addTable('users');
    $q->addUpdate('user_password', $newpass, true);
    $q->addWhere('user_id=\'' . $user_id . '\'');
    $cur = $q->exec();
    if (!$cur) {
        die('SQL error' . $database->stderr(true));
    } else {
        $AppUI->setMsg('New User Password created and emailed to you');
        $AppUI->redirect();
    }
}
开发者ID:222elm,项目名称:dotprojectFrame,代码行数:44,代码来源:sendpass.php

示例3: sendNewPass

function sendNewPass()
{
    global $AppUI;
    $_live_site = dPgetConfig('base_url');
    $_sitename = dPgetConfig('company_name');
    // ensure no malicous sql gets past
    $checkusername = trim(dPgetParam($_POST, 'checkusername', ''));
    $checkusername = db_escape($checkusername);
    $confirmEmail = trim(dPgetParam($_POST, 'checkemail', ''));
    $confirmEmail = mb_strtolower(db_escape($confirmEmail));
    $query = 'SELECT user_id FROM users LEFT JOIN contacts ON user_contact = contact_id' . " WHERE user_username='{$checkusername}' AND LOWER(contact_email)='{$confirmEmail}'";
    if (!($user_id = db_loadResult($query)) || !$checkusername || !$confirmEmail) {
        $AppUI->setMsg('Invalid username or email.', UI_MSG_ERROR);
        $AppUI->redirect();
    }
    $newpass = makePass();
    $message = $AppUI->_('sendpass0', UI_OUTPUT_RAW) . ' ' . $checkusername . ' ' . $AppUI->_('sendpass1', UI_OUTPUT_RAW) . ' ' . $_live_site . ' ' . $AppUI->_('sendpass2', UI_OUTPUT_RAW) . ' ' . $newpass . ' ' . $AppUI->_('sendpass3', UI_OUTPUT_RAW);
    $subject = "{$_sitename} :: " . $AppUI->_('sendpass4', UI_OUTPUT_RAW) . " - {$checkusername}";
    $m = new Mail();
    // create the mail
    $m->From("dotProject@" . dPgetConfig('site_domain'));
    $m->To($confirmEmail);
    $m->Subject($subject);
    $m->Body($message, isset($GLOBALS['locale_char_set']) ? $GLOBALS['locale_char_set'] : "");
    // set the body
    $m->Send();
    // send the mail
    $newpass = md5($newpass);
    $sql = "UPDATE users SET user_password='{$newpass}' WHERE user_id='{$user_id}'";
    $cur = db_exec($sql);
    if (!$cur) {
        die('SQL error' . $database->stderr(true));
    } else {
        $AppUI->setMsg('New User Password created and emailed to you');
        $AppUI->redirect();
    }
}
开发者ID:illuminate3,项目名称:dotproject,代码行数:37,代码来源:sendpass.php

示例4: min

if ($user_id && $m_orig == 'admin' && $a_orig == 'viewuser') {
    $q->addWhere('project_owner = ' . $user_id);
}
if ($showInactive != '1') {
    $q->addWhere('project_status != 7');
}
$pjobj->setAllowedSQL($AppUI->user_id, $q, null, 'p');
$q->addGroup('p.project_id');
$q->addOrder('project_name, task_end_date DESC');
$projects = $q->loadList();
$q->clear();
// Don't push the width higher than about 1200 pixels, otherwise it may not display.
$width = min(dPgetParam($_GET, 'width', 600), 1400);
$start_date = dPgetParam($_GET, 'start_date', 0);
$end_date = dPgetParam($_GET, 'end_date', 0);
$showAllGantt = dPgetParam($_REQUEST, 'showAllGantt', '0');
//$showTaskGantt = dPgetParam($_GET, 'showTaskGantt', '0');
$graph = new GanttGraph($width);
$graph->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK);
$graph->SetFrame(false);
$graph->SetBox(true, array(0, 0, 0), 2);
$graph->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);
$pLocale = setlocale(LC_TIME, 0);
// get current locale for LC_TIME
$res = @setlocale(LC_TIME, $AppUI->user_lang[0]);
if ($res) {
    // Setting locale doesn't fail
    $graph->scale->SetDateLocale($AppUI->user_lang[0]);
}
setlocale(LC_TIME, $pLocale);
if ($start_date && $end_date) {
开发者ID:kilivan,项目名称:dotproject,代码行数:31,代码来源:gantt.php

示例5: die

<?php

//$Id: do_task_assign_aed.php 5731 2008-06-06 23:02:31Z merlinyoda $
if (!defined('DP_BASE_DIR')) {
    die('You should not access this file directly.');
}
$del = isset($_POST['del']) ? $_POST['del'] : 0;
$rm = isset($_POST['rm']) ? $_POST['rm'] : 0;
$hassign = @$_POST['hassign'];
$htasks = @$_POST['htasks'];
$store = dPgetParam($_POST, 'store', 0);
$chUTP = dPgetParam($_POST, 'chUTP', 0);
$percentage_assignment = dPgetParam($_POST, 'percentage_assignment');
$user_task_priority = dPgetParam($_POST, 'user_task_priority');
$user_id = @$_POST['user_id'];
// prepare the percentage of assignment per user as required by CTask::updateAssigned()
$hperc_assign_ar = array();
if (isset($hassign)) {
    $tarr = explode(',', $hassign);
    foreach ($tarr as $uid) {
        if (intval($uid) > 0) {
            $hperc_assign_ar[$uid] = $percentage_assignment;
        }
    }
}
// prepare a list of tasks to process
$htasks_ar = array();
if (isset($htasks)) {
    $tarr = explode(',', $htasks);
    foreach ($tarr as $tid) {
        if (intval($tid) > 0) {
开发者ID:klr2003,项目名称:sourceread,代码行数:31,代码来源:do_task_assign_aed.php

示例6: max

$q->addJoin('projects', 'p', 'p.project_id = t.task_project');
$q->addJoin('companies', 'c', 'p.project_company = c.company_id');
$q->addQuery('u.user_username, t.task_name, t.task_start_date, t.task_milestone' . ', ut.perc_assignment, t.task_end_date, t.task_dynamic' . ', p.project_color_identifier, p.project_name');
$q->addOrder('t.task_name, t.task_start_date, t.task_end_date, ut.perc_assignment');
$tasks = $q->loadList();
$q->clear();
$q->addTable('user_tasks', 'ut');
$q->innerJoin('users', 'u', 'u.user_id = ut.user_id');
$q->innerJoin('tasks', 't', 't.task_id = ut.task_id');
$q->addQuery('min(t.task_start_date) AS task_min_date, max(t.task_end_date) AS task_max_date');
$taskMinMax = $q->loadList();
$q->clear();
$width = dPgetParam($_GET, 'width', 600);
$start_date = dPgetParam($_GET, 'start_date', 0);
$end_date = dPgetParam($_GET, 'end_date', 0);
$showTaskGantt = dPgetParam($_GET, 'showTaskGantt', 0);
$graph2 = new GanttGraph($width);
$graph2->ShowHeaders(GANTT_HYEAR | GANTT_HMONTH | GANTT_HDAY | GANTT_HWEEK);
$graph2->SetFrame(false);
$graph2->SetBox(true, array(0, 0, 0), 2);
$graph2->scale->week->SetStyle(WEEKSTYLE_FIRSTDAY);
$pLocale = setlocale(LC_TIME, 0);
// get current locale for LC_TIME
$res = @setlocale(LC_TIME, $AppUI->user_lang[2]);
if ($res) {
    // Setting locale doesn't fail
    $graph->scale->SetDateLocale($AppUI->user_lang[2]);
}
setlocale(LC_TIME, $pLocale);
if ($start_date && $end_date) {
    $graph2->SetDateRange($start_date, $end_date);
开发者ID:klr2003,项目名称:sourceread,代码行数:31,代码来源:gantt2.php

示例7: die

<?php

/* FILES $Id: index.php 6149 2012-01-09 11:58:40Z ajdonnison $ */
if (!defined('DP_BASE_DIR')) {
    die('You should not access this file directly.');
}
$AppUI->savePlace();
// "File" filters info
$AppUI->setState('FileIdxTab', (int) dPgetParam($_GET, 'tab'));
$tab = $AppUI->getState('FileIdxTab', 0);
$active = intval(!$AppUI->getState('FileIdxTab'));
// to pass to "new file" button
$folder = intval(dPgetParam($_GET, 'folder', 0));
// "Project" filters info
require_once $AppUI->getModuleClass('projects');
// retrieve any state parameters
if (isset($_REQUEST['project_id'])) {
    $AppUI->setState('FileIdxProject', $_REQUEST['project_id']);
}
$project_id = $AppUI->getState('FileIdxProject', 0);
/*
 * get "Allowed" projects for filter list 
 * ("All" is always allowed when basing permission on projects)
 */
$project = new CProject();
$extra = array('from' => 'files', 'where' => 'project_id = file_project');
$projects = $project->getAllowedRecords($AppUI->user_id, 'project_id,project_name', 'project_name', null, $extra);
$projects = arrayMerge(array('0' => $AppUI->_('All', UI_OUTPUT_RAW)), $projects);
// get SQL for allowed projects/tasks and folders
$task = new CTask();
$allowedProjects = $project->getAllowedSQL($AppUI->user_id, 'file_project');
开发者ID:srinivasulurao,项目名称:jonel,代码行数:31,代码来源:index.php

示例8: CFileFolder

global $AppUI, $project_id, $task_id, $deny, $canRead, $canEdit, $dPconfig, $cfObj, $m, $obj;
require_once $AppUI->getModuleClass('files');
global $allowed_folders_ary, $denied_folders_ary, $limited;
$cfObj = new CFileFolder();
$allowed_folders_ary = $cfObj->getAllowedRecords($AppUI->user_id);
$denied_folders_ary = $cfObj->getDeniedRecords($AppUI->user_id);
$limited = count($allowed_folders_ary) < $cfObj->countFolders() ? true : false;
if (!$limited) {
    $canEdit = true;
} else {
    if ($limited && array_key_exists($folder, $allowed_folders_ary)) {
        $canEdit = true;
    } else {
        $canEdit = false;
    }
}
$showProject = false;
$project_id = $obj->task_project;
if (getPermission('files', 'edit')) {
    echo '<a href="?m=files&amp;a=addedit&amp;project_id=' . $project_id . '&amp;file_task=' . $task_id . '">' . $AppUI->_('Attach a file') . '</a>';
    echo dPshowImage(dPfindImage('stock_attach-16.png', $m), 16, 16, '');
}
$canAccess_folders = getPermission('file_folders', 'access');
if ($canAccess_folders) {
    $folder = (int) dPgetParam($_GET, 'folder', 0);
    require DP_BASE_DIR . '/modules/files/folders_table.php';
} else {
    if (getPermission('files', 'view')) {
        require DP_BASE_DIR . '/modules/files/index_table.php';
    }
}
开发者ID:srinivasulurao,项目名称:jonel,代码行数:31,代码来源:tasks_tab.files.php

示例9: die

<?php

/* PROJECTS $Id: view.php,v 1.94.4.11 2007/08/10 00:30:31 merlinyoda Exp $ */
if (!defined('DP_BASE_DIR')) {
    die('You should not access this file directly.');
}
$project_id = intval(dPgetParam($_GET, "project_id", 0));
// check permissions for this record
$perms =& $AppUI->acl();
$canRead = $perms->checkModuleItem($m, 'view', $project_id);
$canEdit = $perms->checkModuleItem($m, 'edit', $project_id);
$canEditT = $perms->checkModule('tasks', 'add');
if (!$canRead) {
    $AppUI->redirect("m=public&a=access_denied");
}
// retrieve any state parameters
if (isset($_GET['tab'])) {
    $AppUI->setState('ProjVwTab', $_GET['tab']);
}
$tab = $AppUI->getState('ProjVwTab') !== NULL ? $AppUI->getState('ProjVwTab') : 0;
// check if this record has dependencies to prevent deletion
$msg = '';
$obj = new CProject();
// Now check if the proect is editable/viewable.
$denied = $obj->getDeniedRecords($AppUI->user_id);
if (in_array($project_id, $denied)) {
    $AppUI->redirect("m=public&a=access_denied");
}
$canDelete = $obj->canDelete($msg, $project_id);
// get critical tasks (criteria: task_end_date)
$criticalTasks = $project_id > 0 ? $obj->getCriticalTasks($project_id) : NULL;
开发者ID:magsilva,项目名称:dotproject,代码行数:31,代码来源:view.php

示例10: die

<?php

/* CONTACTS $Id: view.php 6200 2013-01-15 06:24:08Z ajdonnison $ */
if (!defined('DP_BASE_DIR')) {
    die('You should not access this file directly.');
}
$contact_id = intval(dPgetParam($_GET, 'contact_id', 0));
$AppUI->savePlace();
// load the record data
$msg = '';
$row = new CContact();
$canDelete = $row->canDelete($msg, $contact_id);
// Don't allow to delete contacts, that have a user associated to them.
$q = new DBQuery();
$q->addTable('users');
$q->addQuery('user_id');
$q->addWhere('user_contact = ' . $contact_id);
$sql = $q->prepare();
$q->clear();
$tmp_user = db_loadResult($sql);
if (!empty($tmp_user)) {
    $canDelete = false;
}
$canEdit = getPermission($m, 'edit', $contact_id);
if (!$row->load($contact_id) && $contact_id > 0) {
    $AppUI->setMsg('Contact');
    $AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
    $AppUI->redirect();
} else {
    if ($row->contact_private && $row->contact_owner != $AppUI->user_id && $row->contact_owner && $contact_id != 0) {
        $AppUI->redirect('m=public&a=access_denied');
开发者ID:222elm,项目名称:dotprojectFrame,代码行数:31,代码来源:view.php

示例11: DBQuery

        $filter = "dept_company = " . $_GET["company_id"];
        $additional_get_information = "company_id=" . $_GET["company_id"];
        break;
}
$q = new DBQuery();
$q->addTable($table_name);
$q->addQuery("{$id_field}, {$name_field}");
if ($filter != null) {
    $q->addWhere($filter);
}
$q->addOrder($name_field);
$company_list = array("0" => "") + $q->loadHashList();
?>

<?php 
if (dPgetParam($_POST, $id_field, 0) != 0) {
    $q = new DBQuery();
    $q->addTable($table_name);
    $q->addQuery('*');
    $q->addWhere("{$id_field}=" . $_POST[$id_field]);
    $sql = $q->prepare();
    $q->clear();
    db_loadHash($sql, $r_data);
    $data_update_script = "";
    $update_address = isset($_POST["overwrite_address"]);
    if ($table_name == "companies") {
        $update_fields = array();
        if ($update_address) {
            $update_fields = array("company_address1" => "contact_address1", "company_address2" => "contact_address2", "company_city" => "contact_city", "company_state" => "contact_state", "company_zip" => "contact_zip", "company_phone1" => "contact_phone", "company_phone2" => "contact_phone2", "company_fax" => "contact_fax");
        }
        $data_update_script = "opener.setCompany('" . $_POST[$id_field] . "', '" . db_escape($r_data[$name_field]) . "');\n";
开发者ID:illuminate3,项目名称:dotproject,代码行数:31,代码来源:select_contact_company.php

示例12: die

<?php

if (!defined('DP_BASE_DIR')) {
    die('You should not access this file directly.');
}
$show_all = (int) dPgetParam($_REQUEST, 'show_all', 0);
$company_id = (int) dPgetParam($_REQUEST, 'company_id', 0);
$contact_id = (int) dPgetParam($_POST, 'contact_id', 0);
$call_back = dPgetCleanParam($_GET, 'call_back', null);
$contacts_submited = (int) dPgetParam($_POST, 'contacts_submited', 0);
$selected_contacts_id = dPgetCleanParam($_GET, 'selected_contacts_id', '');
if (dPgetParam($_POST, 'selected_contacts_id')) {
    $selected_contacts_id = dPgetCleanParam($_POST, 'selected_contacts_id');
}
?>
<script language="javascript">
function setContactIDs (method,querystring)
{
	var URL = 'index.php?m=public&a=contact_selector';
    
	var field = document.getElementsByName('contact_id[]');
	var selected_contacts_id = document.frmContactSelect.selected_contacts_id;
	var currentIDstring = selected_contacts_id.value.toString();
	var currentIDs = currentIDstring.split(',');
	var addkeepIDs = new Array();
	var dropIDs = new Array();
	var resultIDs = new Array();
	var i = 0;
	var j = 0;
	var flag = 0;
	
开发者ID:222elm,项目名称:dotprojectFrame,代码行数:30,代码来源:contact_selector.php

示例13: CFileFolder

}
global $AppUI, $project_id, $deny, $canRead, $canEdit, $dPconfig, $cfObj, $m;
require_once $AppUI->getModuleClass('files');
global $allowed_folders_ary, $denied_folders_ary, $limited;
$cfObj = new CFileFolder();
$allowed_folders_ary = $cfObj->getAllowedRecords($AppUI->user_id);
$denied_folders_ary = $cfObj->getDeniedRecords($AppUI->user_id);
$limited = count($allowed_folders_ary) < $cfObj->countFolders() ? true : false;
if (!$limited) {
    $canEdit = true;
} else {
    if ($limited && array_key_exists($folder, $allowed_folders_ary)) {
        $canEdit = true;
    } else {
        $canEdit = false;
    }
}
$showProject = false;
if (getPermission('files', 'edit')) {
    echo '<a href="?m=files&amp;a=addedit&amp;project_id=' . $project_id . '">' . $AppUI->_('Attach a file') . '</a>';
    echo dPshowImage(dPfindImage('stock_attach-16.png', $m), 16, 16, '');
}
$canAccess_folders = getPermission('file_folders', 'access');
if ($canAccess_folders) {
    $folder = dPgetParam($_GET, 'folder', 0);
    require DP_BASE_DIR . '/modules/files/folders_table.php';
} else {
    if (getPermission('files', 'view')) {
        require DP_BASE_DIR . '/modules/files/index_table.php';
    }
}
开发者ID:hoodoogurus,项目名称:dotprojecteap,代码行数:31,代码来源:projects_tab.files.php

示例14: dPgetParam

if (!$project_id) {
    $showProject = true;
}
// get company to filter files by
//if (isset( $_POST['company_id'] )) {
//	$AppUI->setState( 'FileIdxCompany', intval( $_POST['company_id'] ) );
//}
//$company_id = $AppUI->getState( 'FileIdxCompany' ) !== NULL ? $AppUI->getState( 'FileIdxCompany' ) : $AppUI->user_company;
if (!isset($company_id)) {
    $company_id = dPgetParam($_REQUEST, 'company_id', 0);
}
$obj = new CCompany();
$allowed_companies_ary = $obj->getAllowedRecords($AppUI->user_id, 'company_id,company_name', 'company_name');
$allowed_companies = implode(",", array_keys($allowed_companies_ary));
if (!isset($task_id)) {
    $task_id = dPgetParam($_REQUEST, 'task_id', 0);
}
global $xpg_min, $xpg_pagesize;
$xpg_pagesize = 30;
$xpg_min = $xpg_pagesize * ($page - 1);
// This is where we start our record set from
// load the following classes to retrieved denied records
include_once $AppUI->getModuleClass('projects');
include_once $AppUI->getModuleClass('tasks');
$project = new CProject();
$deny1 = $project->getDeniedRecords($AppUI->user_id);
$task = new CTask();
$deny2 = $task->getDeniedRecords($AppUI->user_id);
global $file_types;
$file_types = dPgetSysVal("FileType");
$folder = $folder ? $folder : 0;
开发者ID:magsilva,项目名称:dotproject,代码行数:31,代码来源:folders_table.php

示例15: die

<?php

/* CONTACTS $Id: do_contact_aed.php 5872 2009-04-25 00:09:56Z merlinyoda $ */
if (!defined('DP_BASE_DIR')) {
    die('You should not access this file directly.');
}
$obj = new CContact();
$msg = '';
if (!$obj->bind($_POST)) {
    $AppUI->setMsg($obj->getError(), UI_MSG_ERROR);
    $AppUI->redirect();
}
$del = dPgetParam($_POST, 'del', 0);
// prepare (and translate) the module name ready for the suffix
$AppUI->setMsg('Contact');
if ($del) {
    if ($msg = $obj->delete()) {
        $AppUI->setMsg($msg, UI_MSG_ERROR);
        $AppUI->redirect();
    } else {
        $AppUI->setMsg("deleted", UI_MSG_ALERT, true);
        $AppUI->redirect("m=contacts");
    }
} else {
    $isNotNew = @$_POST['contact_id'];
    if ($msg = $obj->store()) {
        $AppUI->setMsg($msg, UI_MSG_ERROR);
    } else {
        $AppUI->setMsg($isNotNew ? 'updated' : 'added', UI_MSG_OK, true);
    }
    $AppUI->redirect();
开发者ID:hoodoogurus,项目名称:dotprojecteap,代码行数:31,代码来源:do_contact_aed.php


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