Exemplo n.º 1
0
/**
 * 
 *
 */
function initialize_gui(&$dbHandler, &$argsObj)
{
    $req_spec_mgr = new requirement_spec_mgr($dbHandler);
    $tproject_mgr = new testproject($dbHandler);
    $commandMgr = new reqSpecCommands($dbHandler);
    $gui = $commandMgr->initGuiBean();
    $gui->req_spec_cfg = config_get('req_spec_cfg');
    $gui->req_cfg = config_get('req_cfg');
    // 20100810 - asimon - BUGID 3317: disabled total count of requirements by default
    $gui->external_req_management = $gui->req_cfg->external_req_management == ENABLED ? 1 : 0;
    $gui->grants = new stdClass();
    $gui->grants->req_mgmt = has_rights($db, "mgt_modify_req");
    $gui->req_spec = $req_spec_mgr->get_by_id($argsObj->req_spec_id);
    $gui->req_spec_id = $argsObj->req_spec_id;
    $gui->tproject_name = $argsObj->tproject_name;
    $gui->name = $gui->req_spec['title'];
    $gui->main_descr = lang_get('req_spec_short') . config_get('gui_title_separator_1') . "[{$gui->req_spec['doc_id']}] :: " . $gui->req_spec['title'];
    $gui->refresh_tree = 'no';
    $gui->cfields = $req_spec_mgr->html_table_of_custom_field_values($argsObj->req_spec_id, $argsObj->tproject_id);
    $gui->attachments = getAttachmentInfosFrom($req_spec_mgr, $argsObj->req_spec_id);
    $gui->requirements_count = $req_spec_mgr->get_requirements_count($argsObj->req_spec_id);
    $gui->reqSpecTypeDomain = init_labels($gui->req_spec_cfg->type_labels);
    /* contribution BUGID 2999, show direct link */
    $prefix = $tproject_mgr->getTestCasePrefix($argsObj->tproject_id);
    $gui->direct_link = $_SESSION['basehref'] . 'linkto.php?tprojectPrefix=' . urlencode($prefix) . '&item=reqspec&id=' . urlencode($gui->req_spec['doc_id']);
    return $gui;
}
/**
 * 
 *
 */
function initialize_gui(&$dbHandler, $argsObj)
{
    $tproject_mgr = new testproject($dbHandler);
    $itemMgr = new requirement_spec_mgr($dbHandler);
    $commandMgr = new reqSpecCommands($dbHandler, $argsObj->tproject_id);
    $gui = $commandMgr->initGuiBean();
    $gui->itemCfg = config_get('req_spec_cfg');
    $gui->tproject_name = $argsObj->tproject_name;
    $gui->grants = new stdClass();
    $gui->grants->req_mgmt = has_rights($dbHandler, "mgt_modify_req");
    $gui->tcasePrefix = $tproject_mgr->getTestCasePrefix($argsObj->tproject_id);
    $gui->glueChar = config_get('testcase_cfg')->glue_character;
    $gui->pieceSep = config_get('gui_title_separator_1');
    $gui->item_id = $argsObj->item_id;
    $info = $itemMgr->getRevisionByID($gui->item_id, array('decode_user' => true));
    $gui->item = $info;
    $gui->cfields = $itemMgr->html_table_of_custom_field_values(null, $gui->item_id, $argsObj->tproject_id);
    $gui->show_title = false;
    $gui->main_descr = lang_get('req_spec') . $gui->pieceSep . $gui->item['name'];
    $gui->showContextInfo = $argsObj->showContextInfo;
    if ($gui->showContextInfo) {
        $gui->parent_descr = lang_get('req_spec_short') . $gui->pieceSep . $gui->item['name'];
    }
    $gui->itemSpecStatus = null;
    $gui->itemTypeDomain = init_labels($gui->itemCfg->type_labels);
    return $gui;
}
Exemplo n.º 3
0
/**
 * 
 *
 */
function initialize_gui(&$dbHandler, $argsObj)
{
    $tproject_mgr = new testproject($dbHandler);
    $req_mgr = new requirement_mgr($dbHandler);
    $commandMgr = new reqCommands($db);
    $gui = $commandMgr->initGuiBean();
    $gui->req_cfg = config_get('req_cfg');
    $gui->tproject_name = $argsObj->tproject_name;
    $gui->grants = new stdClass();
    $gui->grants->req_mgmt = has_rights($db, "mgt_modify_req");
    $gui->tcasePrefix = $tproject_mgr->getTestCasePrefix($argsObj->tproject_id);
    $gui->glueChar = config_get('testcase_cfg')->glue_character;
    $gui->pieceSep = config_get('gui_title_separator_1');
    $gui->req_id = $argsObj->req_id;
    $gui->req_versions = $req_mgr->get_by_id($gui->req_id);
    $gui->req = current($gui->req_versions);
    $gui->req_coverage = $req_mgr->get_coverage($gui->req_id);
    // This seems weird but is done to adapt template than can display multiple
    // requirements. This logic has been borrowed from test case versions management
    $gui->current_version[0] = array($gui->req);
    // BUGID 2877 - Custom Fields linked to Requirement Versions
    $gui->cfields_current_version[0] = $req_mgr->html_table_of_custom_field_values($gui->req_id, $gui->req['version_id'], $argsObj->tproject_id);
    // Now CF for other Versions
    $gui->other_versions[0] = null;
    $gui->cfields_other_versions[] = null;
    if (count($gui->req_versions) > 1) {
        $gui->other_versions[0] = array_slice($gui->req_versions, 1);
        $loop2do = count($gui->other_versions[0]);
        for ($qdx = 0; $qdx < $loop2do; $qdx++) {
            $target_version = $gui->other_versions[0][$qdx]['version_id'];
            $gui->cfields_other_versions[0][$qdx] = $req_mgr->html_table_of_custom_field_values($gui->req_id, $target_version, $argsObj->tproject_id);
        }
    }
    $gui->show_title = false;
    $gui->main_descr = lang_get('req') . $gui->pieceSep . $gui->req['title'];
    $gui->showReqSpecTitle = $argsObj->showReqSpecTitle;
    if ($gui->showReqSpecTitle) {
        $gui->parent_descr = lang_get('req_spec_short') . $gui->pieceSep . $gui->req['req_spec_title'];
    }
    // BUGID 2877 - Custom Fields linked to Requirement Versions
    // $gui->cfields = array();
    // $gui->cfields[] = $req_mgr->html_table_of_custom_field_values($gui->req_id,$argsObj->tproject_id);
    $gui->attachments[$gui->req_id] = getAttachmentInfosFrom($req_mgr, $gui->req_id);
    $gui->attachmentTableName = $req_mgr->getAttachmentTableName();
    $gui->reqStatus = init_labels($gui->req_cfg->status_labels);
    $gui->reqTypeDomain = init_labels($gui->req_cfg->type_labels);
    // added req relations for BUGID 1748
    $gui->req_relations = FALSE;
    $gui->req_relation_select = FALSE;
    $gui->testproject_select = FALSE;
    $gui->req_add_result_msg = isset($argsObj->relation_add_result_msg) ? $argsObj->relation_add_result_msg : "";
    if ($gui->req_cfg->relations->enable) {
        $gui->req_relations = $req_mgr->get_relations($gui->req_id);
        $gui->req_relation_select = $req_mgr->init_relation_type_select();
        if ($gui->req_cfg->relations->interproject_linking) {
            $gui->testproject_select = initTestprojectSelect($db, $argsObj, $tproject_mgr);
        }
    }
    return $gui;
}
Exemplo n.º 4
0
 function __construct(&$db)
 {
     $this->db = $db;
     $this->tcaseMgr = new testcase($db);
     $this->execution_types = $this->tcaseMgr->get_execution_types();
     $this->grants = new stdClass();
     $this->grants->requirement_mgmt = has_rights($db, "mgt_modify_req");
 }
Exemplo n.º 5
0
 /** Before this class can be initted, its rights should be
 	   proven. Any attempt to use the class w/o them will fail. */
 public function checkRights($rights)
 {
     if (!has_rights($rights)) {
         Header("HTTP/1.0 401 Unauthorized");
         Header("Location: PP_error.php?c=accessdenied");
         die;
     }
     $this->rights_checked = true;
 }
Exemplo n.º 6
0
/**
 * Initialize object with information for graphical user interface.
 * 
 * @param tlTestCaseFilterControl $control
 * @return stdClass $gui
 */
function initializeGui(&$dbHandler, &$control)
{
    $gui = new stdClass();
    $gui->feature = $control->args->feature;
    $gui->treeHeader = lang_get('title_navigator') . ' - ' . lang_get('title_test_spec');
    $feature_path = array('edit_tc' => "lib/testcases/archiveData.php", 'keywordsAssign' => "lib/keywords/keywordsAssign.php", 'assignReqs' => "lib/requirements/reqTcAssign.php");
    $gui->tree_drag_and_drop_enabled = array('edit_tc' => has_rights($dbHandler, "mgt_modify_tc") == 'yes', 'keywordsAssign' => false, 'assignReqs' => false);
    $gui->menuUrl = $feature_path[$gui->feature];
    return $gui;
}
Exemplo n.º 7
0
function initialize_gui(&$dbHandler, &$argsObj)
{
    $manager = new milestone_mgr($dbHandler);
    $gui = new stdClass();
    $gui->user_feedback = null;
    $gui->main_descr = lang_get('title_milestones') . $argsObj->tplan_name;
    $gui->action_descr = null;
    $gui->tplan_name = $argsObj->tplan_name;
    $gui->tplan_id = $argsObj->tplan_id;
    $gui->items = $manager->get_all_by_testplan($argsObj->tplan_id);
    $gui->grants = new stdClass();
    $gui->grants->milestone_mgmt = has_rights($dbHandler, "testplan_planning");
    $gui->grants->mgt_view_events = has_rights($dbHandler, "mgt_view_events");
    return $gui;
}
Exemplo n.º 8
0
/**
 * 
 *
 */
function initialize_gui(&$dbHandler, $argsObj)
{
    $tproject_mgr = new testproject($dbHandler);
    $req_mgr = new requirement_mgr($dbHandler);
    $commandMgr = new reqCommands($dbHandler);
    $gui = $commandMgr->initGuiBean();
    $gui->req_cfg = config_get('req_cfg');
    $gui->tproject_name = $argsObj->tproject_name;
    $gui->grants = new stdClass();
    $gui->grants->req_mgmt = has_rights($dbHandler, "mgt_modify_req");
    $gui->tcasePrefix = $tproject_mgr->getTestCasePrefix($argsObj->tproject_id);
    $gui->glueChar = config_get('testcase_cfg')->glue_character;
    $gui->pieceSep = config_get('gui_title_separator_1');
    $gui->item_id = $argsObj->item_id;
    // identify item is version or revision ?
    $node_type_id = $req_mgr->tree_mgr->get_available_node_types();
    $node_id_type = array_flip($node_type_id);
    $item = $req_mgr->tree_mgr->get_node_hierarchy_info($gui->item_id);
    // TICKET 4702
    // target_is is db id of item, item['id'] is the REQ ID.
    // for several logics we need to DB id (target_id)
    $info = null;
    switch ($node_id_type[$item['node_type_id']]) {
        case 'requirement_version':
            $info = $req_mgr->get_version($gui->item_id);
            $info['revision_id'] = -1;
            $info['target_id'] = $info['version_id'];
            break;
        case 'requirement_revision':
            $info = $req_mgr->get_revision($gui->item_id);
            $info['target_id'] = $info['revision_id'];
            break;
    }
    $gui->item = $info;
    $gui->cfields = $req_mgr->html_table_of_custom_field_values(null, $gui->item_id, $argsObj->tproject_id);
    $gui->show_title = false;
    $gui->main_descr = lang_get('req') . $gui->pieceSep . $gui->item['title'];
    $gui->showReqSpecTitle = $argsObj->showReqSpecTitle;
    if ($gui->showReqSpecTitle) {
        $gui->parent_descr = lang_get('req_spec_short') . $gui->pieceSep . $gui->item['req_spec_title'];
    }
    $gui->reqStatus = init_labels($gui->req_cfg->status_labels);
    $gui->reqTypeDomain = init_labels($gui->req_cfg->type_labels);
    return $gui;
}
/**
 * 
 *
 */
function initialize_gui(&$dbHandler, &$argsObj)
{
    $req_spec_mgr = new requirement_spec_mgr($dbHandler);
    $tproject_mgr = new testproject($dbHandler);
    $commandMgr = new reqSpecCommands($dbHandler, $argsObj->tproject_id);
    $gui = $commandMgr->initGuiBean();
    $gui->refreshTree = $argsObj->refreshTree;
    $gui->req_spec_cfg = config_get('req_spec_cfg');
    $gui->req_cfg = config_get('req_cfg');
    $gui->external_req_management = $gui->req_cfg->external_req_management == ENABLED ? 1 : 0;
    $gui->grants = new stdClass();
    $gui->grants->req_mgmt = has_rights($db, "mgt_modify_req");
    $gui->req_spec = $req_spec_mgr->get_by_id($argsObj->req_spec_id);
    $gui->revCount = $req_spec_mgr->getRevisionsCount($argsObj->req_spec_id);
    $gui->req_spec_id = intval($argsObj->req_spec_id);
    $gui->parentID = $argsObj->req_spec_id;
    $gui->req_spec_revision_id = $gui->req_spec['revision_id'];
    $gui->name = $gui->req_spec['title'];
    $gui->tproject_name = $argsObj->tproject_name;
    $gui->main_descr = lang_get('req_spec_short') . config_get('gui_title_separator_1') . "[{$gui->req_spec['doc_id']}] :: " . $gui->req_spec['title'];
    $gui->refresh_tree = 'no';
    $gui->cfields = $req_spec_mgr->html_table_of_custom_field_values($gui->req_spec_id, $gui->req_spec_revision_id, $argsObj->tproject_id);
    $gui->attachments = getAttachmentInfosFrom($req_spec_mgr, $argsObj->req_spec_id);
    $gui->requirements_count = $req_spec_mgr->get_requirements_count($argsObj->req_spec_id);
    $gui->reqSpecTypeDomain = init_labels($gui->req_spec_cfg->type_labels);
    $prefix = $tproject_mgr->getTestCasePrefix($argsObj->tproject_id);
    $gui->direct_link = $_SESSION['basehref'] . 'linkto.php?tprojectPrefix=' . urlencode($prefix) . '&item=reqspec&id=' . urlencode($gui->req_spec['doc_id']);
    $gui->fileUploadURL = $_SESSION['basehref'] . $req_spec_mgr->getFileUploadRelativeURL($gui->req_spec_id);
    $gui->delAttachmentURL = $_SESSION['basehref'] . $req_spec_mgr->getDeleteAttachmentRelativeURL($gui->req_spec_id);
    $gui->fileUploadMsg = '';
    $gui->import_limit = TL_REPOSITORY_MAXFILESIZE;
    $gui->btn_import_req_spec = '';
    $gui->reqMgrSystemEnabled = 0;
    if (!is_null($reqMgrSystem = $commandMgr->getReqMgrSystem())) {
        $gui->btn_import_req_spec = sprintf(lang_get('importViaAPI'), $reqMgrSystem['reqmgrsystem_name']);
        $gui->reqMgrSystemEnabled = 1;
    }
    return $gui;
}
Exemplo n.º 10
0
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * 
**/


include ("../lib/admin.defines.php");
include ("../lib/admin.module.access.php");
include ("../lib/Form/Class.FormHandler.inc.php");
include ("./form_data/FG_var_did_billing.inc");
include ("../lib/admin.smarty.php");

if (!has_rights(ACX_DID)) {
	Header("HTTP/1.0 401 Unauthorized");
	Header("Location: PP_error.php?c=accessdenied");
	die();
}

$HD_Form->setDBHandler(DbConnect());

$HD_Form->init();

if ($id != "" || !is_null($id)) {
	$HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "$id", $HD_Form->FG_EDITION_CLAUSE);
}

if (!isset ($form_action))
	$form_action = "list"; //ask-add
Exemplo n.º 11
0
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include_once '../../lib/admin.defines.php';
include_once '../../lib/admin.module.access.php';
if (!has_rights(ACX_DASHBOARD)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
$DBHandle = DbConnect();
$QUERY_COUNT_CARD_ALL = "SELECT count(*) FROM cc_card";
$QUERY_COUNT_CARD_ACTIVED = "SELECT count(*) FROM cc_card WHERE status = 1";
$QUERY_COUNT_CARD_CANCELLED = "SELECT count(*) FROM cc_card WHERE status = 0";
$QUERY_COUNT_CARD_NEW = "SELECT count(*) FROM cc_card WHERE status = 2";
$QUERY_COUNT_CARD_WAITING = "SELECT count(*) FROM cc_card WHERE status = 3";
$QUERY_COUNT_CARD_RESERVED = "SELECT count(*) FROM cc_card WHERE status = 4";
$QUERY_COUNT_CARD_EXPIRED = "SELECT count(*) FROM cc_card WHERE status = 5";
$QUERY_COUNT_CARD_SUSPENDED = "SELECT count(*) FROM cc_card WHERE status = 6 OR status = 7";
$table = new Table('cc_card', '*');
$result = $table->SQLExec($DBHandle, $QUERY_COUNT_CARD_ALL);
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include '../lib/admin.defines.php';
include '../lib/admin.module.access.php';
include '../lib/config_functions.php';
include '../lib/Form/Class.FormHandler.inc.php';
include './form_data/FG_var_config.inc';
include '../lib/admin.smarty.php';
if (!has_rights(ACX_ACXSETTING)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
// #### HEADER SECTION
$smarty->display('main.tpl');
// #### HELP SECTION
if ($form_action == 'list') {
    echo $CC_help_add_agi_confx;
} else {
    echo $CC_help_add_agi_confx;
}
// #### TOP SECTION PAGE
Exemplo n.º 13
0
/**
 * TestLink Open Source Project - http://testlink.sourceforge.net/ 
 * This script is distributed under the GNU General Public License 2 or later. 
 *
 * Get list of users with a project right
 * 
 * @package 	TestLink
 * @author 		Martin Havlat
 * @copyright 	2009, TestLink community 
 * @version    	CVS: $Id: getUsersWithRight.php,v 1.1 2010/02/12 00:20:12 havlat Exp $
 *
 * @internal Revisions:
 * None
 *
 **/
require_once '../../config.inc.php';
require_once 'common.php';
testlinkInitPage($db);
$data = array();
$iParams = array("right" => array(tlInputParameter::STRING_N, 0, 100, '/^[a-z0-9_]+$/'));
$args = G_PARAMS($iParams);
// user must have the same right as requested (security)
if (has_rights($db, $args['right'])) {
    $tlUser = new tlUser($_SESSION['userID']);
    $data['rows'] = $tlUser->getNamesForProjectRight($db, $args['right'], $_SESSION['testprojectID']);
    $data['rows'][] = array('id' => '0', 'login' => ' ', 'first' => ' ', 'last' => ' ');
    // option for no owner
} else {
    tLog('Invalid right for the user: '******'right'], 'ERROR');
}
echo json_encode($data);
Exemplo n.º 14
0
<?php

$menu_section = 'menu_callback';
include "../lib/defines.php";
include "../lib/module.access.php";
include "../lib/Form/Class.FormHandler.inc.php";
include "./form_data/FG_var_callback.inc";
if (!has_rights(ACX_CALLBACK)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
/***********************************************************************************/
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
if ($id != "" || !is_null($id)) {
    $HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$id}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
    $form_action = "list";
}
//ask-add
if (!isset($action)) {
    $action = $form_action;
}
$list = $HD_Form->perform_action($form_action);
// #### HEADER SECTION
include 'PP_header.php';
// #### HELP SECTION
show_help('callback');
?>
Exemplo n.º 15
0
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include '../lib/admin.defines.php';
include '../lib/admin.module.access.php';
include '../lib/admin.smarty.php';
include '../lib/support/classes/receipt.php';
include '../lib/support/classes/receiptItem.php';
if (!has_rights(ACX_INVOICING)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
getpost_ifset(array('date', 'id', 'action', 'price', 'description', 'idc'));
if (empty($id)) {
    Header("Location: A2B_entity_receipt.php?atmenu=payment&section=13");
}
if (!empty($action)) {
    switch ($action) {
        case 'add':
            if (empty($date) || strtotime($date) === FALSE) {
                $error_msg .= gettext("Date inserted is invalid, it must respect a date format YYYY-MM-DD HH:MM:SS (time is optional).<br/>");
            }
            if (empty($price) || !is_numeric($price)) {
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * 
**/


include ("../lib/admin.defines__vt.php");
include ("../lib/admin.module.access__vt.php");
include ("../lib/Form/Class.FormHandler.inc__vt.php");
include ("./form_data/FG_var_def_ratecard__vt.inc");
include ("../lib/admin.smarty__vt.php");

if (!has_rights(ACX_RATECARD)) {
	Header("HTTP/1.0 401 Unauthorized");
	Header("Location: PP_error__vt.php?c=accessdenied");
	die();
}

getpost_ifset(array('package','popup_select', 'popup_formname', 'popup_fieldname','posted', 'Period', 'frommonth', 'fromstatsmonth', 'tomonth', 'tostatsmonth', 'fromday', 'fromstatsday_sday', 'fromstatsmonth_sday', 'today', 'tostatsday_sday', 'tostatsmonth_sday', 'current_page', 'removeallrate', 'removetariffplan', 'definecredit', 'IDCust', 'mytariff_id', 'destination', 'dialprefix', 'buyrate1', 'buyrate2', 'buyrate1type', 'buyrate2type', 'rateinitial1', 'rateinitial2', 'rateinitial1type', 'rateinitial2type', 'id_trunk', "check", "type", "mode"));


/********************************* BATCH UPDATE ***********************************/
getpost_ifset(array ( 'batchupdate', 'upd_id_trunk', 'upd_idtariffplan', 'upd_id_outbound_cidgroup', 'upd_tag', 'upd_inuse', 'upd_activated', 'upd_language',
	'upd_tariff', 'upd_credit', 'upd_credittype', 'upd_simultaccess', 'upd_currency', 'upd_typepaid', 'upd_creditlimit', 'upd_enableexpire', 'upd_expirationdate',
	'upd_expiredays', 'upd_runservice', 'filterprefix', 'filterfield'
));

$update_fields = array (
Exemplo n.º 17
0
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include '../lib/admin.defines.php';
include '../lib/admin.module.access.php';
include '../lib/Form/Class.FormHandler.inc.php';
include './form_data/FG_var_card_seria.inc';
include '../lib/admin.smarty.php';
if (!has_rights(ACX_CUSTOMER)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
getpost_ifset(array('popup_select', 'popup_formname', 'popup_fieldname'));
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
if ($id != "" || !is_null($id)) {
    $HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$id}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
    $form_action = "list";
}
//ask-add
if (!isset($action)) {
Exemplo n.º 18
0
    $default_template = $op->template;
} else {
    $msg = getKeywordErrorMessage($op->status);
}
$keywords = null;
if ($default_template == 'keywordsView.tpl') {
    $keywords = $tprojectMgr->getKeywords($args->testproject_id);
}
$smarty->assign('user_feedback', $msg);
$smarty->assign('canManage', $canManage);
$smarty->assign('keywords', $keywords);
$smarty->assign('name', $args->keyword);
$smarty->assign('keyword', $args->keyword);
$smarty->assign('notes', $args->notes);
$smarty->assign('keywordID', $args->keyword_id);
$smarty->assign('mgt_view_events', has_rights($db, "mgt_view_events"));
$smarty->display($template_dir . $default_template);
/**
 * @return object returns the arguments for the page
 */
function init_args()
{
    $args = new stdClass();
    $bPostBack = sizeof($_POST);
    $source = $bPostBack ? "POST" : "GET";
    $iParams = array("doAction" => array($source, tlInputParameter::STRING_N, 0, 50), "id" => array($source, tlInputParameter::INT_N), "keyword" => array($source, tlInputParameter::STRING_N, 0, 100), "notes" => array($source, tlInputParameter::STRING_N));
    $pParams = I_PARAMS($iParams);
    $args = new stdClass();
    $args->doAction = $pParams["doAction"];
    $args->keyword_id = $pParams["id"];
    $args->keyword = $pParams["keyword"];
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include '../lib/admin.defines.php';
include '../lib/admin.module.access.php';
include '../lib/Form/Class.FormHandler.inc.php';
include './form_data/FG_var_billing_customer.inc';
include '../lib/admin.smarty.php';
if (!has_rights(ACX_BILLING)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
if ($id != "" || !is_null($id)) {
    $HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$id}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
    $form_action = "list";
}
//ask-add
if (!isset($action)) {
    $action = $form_action;
Exemplo n.º 20
0
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include '../lib/admin.defines.php';
include '../lib/admin.module.access.php';
include '../lib/Form/Class.FormHandler.inc.php';
include './form_data/FG_var_service.inc';
include '../lib/admin.smarty.php';
if (!has_rights(ACX_CRONT_SERVICE)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
if ($id != "" || !is_null($id)) {
    $HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$id}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
    $form_action = "list";
}
//ask-add
if (!isset($action)) {
    $action = $form_action;
Exemplo n.º 21
0
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include '../lib/agent.defines.php';
include '../lib/agent.module.access.php';
include '../lib/agent.smarty.php';
include '../lib/support/classes/ticket.php';
include '../lib/support/classes/comment.php';
include '../lib/epayment/includes/general.php';
if (!has_rights(ACX_SUPPORT)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
getpost_ifset(array('result', 'id', 'action', 'status', 'comment', 'idc'));
if ($result == "success") {
    $message = gettext("Ticket updated successfully");
}
if (isset($id)) {
    $ticketID = $id;
} else {
    exit(gettext("Ticket ID not found"));
}
if (tep_not_null($action)) {
    switch ($action) {
Exemplo n.º 22
0
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include '../lib/admin.defines.php';
include '../lib/admin.module.access.php';
include '../lib/Form/Class.FormHandler.inc.php';
include './form_data/FG_var_trunk.inc';
include '../lib/admin.smarty.php';
if (!has_rights(ACX_TRUNK)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
getpost_ifset(array('popup_select', 'popup_formname', 'popup_fieldname'));
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
if ($id != "" || !is_null($id)) {
    $HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$id}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
    $form_action = "list";
}
//ask-add
if (!isset($action)) {
Exemplo n.º 23
0
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * 
**/


include ("../lib/admin.defines.php");
include ("../lib/admin.module.access.php");
include ("../lib/admin.smarty.php");

if (! has_rights (ACX_ADMINISTRATOR)) { 
	Header ("HTTP/1.0 401 Unauthorized");
	Header ("Location: PP_error.php?c=accessdenied");	   
	die();	   
}

getpost_ifset(array('id','groupID'));

if(!is_numeric($groupID) || ($groupID != 0 && $groupID != 1)) $groupID =0;

if (empty($id)) {
	header("Location: A2B_entity_user.php?atmenu=user&groupID=$groupID&section=3");
}

$DBHandle  = DbConnect();
Exemplo n.º 24
0
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include './lib/customer.defines.php';
include './lib/customer.module.access.php';
include './lib/customer.smarty.php';
include './lib/support/classes/receipt.php';
include './lib/support/classes/receiptItem.php';
if (!has_rights(ACX_INVOICES)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
getpost_ifset(array('id'));
if (empty($id)) {
    Header("Location: A2B_entity_receipt.php?atmenu=payment&section=13");
}
$receipt = new receipt($id);
if ($receipt->getCard() != $_SESSION["card_id"]) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
$items = $receipt->loadItems();
Exemplo n.º 25
0
 * @author 		Erik Eloff
 * @copyright 	2010, TestLink community
 * @version    	CVS: $Id: checkTCaseDuplicateName.php,v 1.3 2010/10/10 13:41:13 franciscom Exp $
 *
 * @internal Revisions:
 * 20101010 - franciscom - added testsuite_id as parameter, needed to do checks when creating test case
 * 20100225 - eloff - initial commit
 *
 **/
require_once '../../config.inc.php';
require_once 'common.php';
testlinkInitPage($db);
$data = array('success' => true, 'message' => '');
$iParams = array("name" => array(tlInputParameter::STRING_N, 0, 100), "testcase_id" => array(tlInputParameter::INT), "testsuite_id" => array(tlInputParameter::INT));
$args = G_PARAMS($iParams);
if (has_rights($db, 'mgt_view_tc')) {
    $tree_manager = new tree($db);
    $node_types_descr_id = $tree_manager->get_available_node_types();
    // To allow name check when creating a NEW test case => we do not have test case id
    $args['testcase_id'] = $args['testcase_id'] > 0 ? $args['testcase_id'] : null;
    $args['testsuite_id'] = $args['testsuite_id'] > 0 ? $args['testsuite_id'] : null;
    // for debug -
    // $xx = "\$args['testcase_id']:{$args['testcase_id']} - \$args['name']:{$args['name']}" .
    //       " - \$args['testsuite_id']:{$args['testsuite_id']}";
    // file_put_contents('c:\checkTCaseDuplicateName.php.ajax', $xx);
    $check = $tree_manager->nodeNameExists($args['name'], $node_types_descr_id['testcase'], $args['testcase_id'], $args['testsuite_id']);
    $data['success'] = !$check['status'];
    $data['message'] = $check['msg'];
} else {
    tLog('User has not right needed to do requested action - checkTCaseDuplicateName.php', 'ERROR');
    $data['success'] = false;
Exemplo n.º 26
0
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include_once dirname(__FILE__) . "/../lib/admin.defines.php";
include_once dirname(__FILE__) . "/jpgraph_lib/jpgraph.php";
include_once dirname(__FILE__) . "/jpgraph_lib/jpgraph_line.php";
include_once dirname(__FILE__) . "/jpgraph_lib/jpgraph_bar.php";
include_once dirname(__FILE__) . "/../lib/admin.module.access.php";
if (!has_rights(ACX_CALL_REPORT)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
$FG_DEBUG = 0;
getpost_ifset(array('typegraph', 'min_call', 'fromstatsday_sday', 'days_compare', 'fromstatsmonth_sday', 'dsttype', 'srctype', 'clidtype', 'channel', 'resulttype', 'dst', 'src', 'clid', 'userfieldtype', 'userfield', 'accountcodetype', 'accountcode', 'hourinterval', 'customer', 'entercustomer', 'enterprovider', 'entertrunk'));
if (!($hourinterval >= 0) && $hourinterval <= 23) {
    exit;
}
// The variable FG_TABLE_NAME define the table name to use
$FG_TABLE_NAME = "cc_call t1 LEFT OUTER JOIN cc_trunk t3 ON t1.id_trunk = t3.id_trunk";
$DBHandle = DbConnect();
// The variable Var_col would define the col that we want show in your table
// First Name of the column in the html page, second name of the field
$FG_TABLE_COL = array();
Exemplo n.º 27
0
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include '../lib/admin.defines.php';
include '../lib/admin.module.access.php';
include '../lib/Form/Class.FormHandler.inc.php';
include './form_data/FG_var_restore.inc';
include '../lib/admin.smarty.php';
if (!has_rights(ACX_MAINTENANCE)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
if (!empty($form_action)) {
    check_demo_mode();
}
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
if ($id != "" || !is_null($id)) {
    $HD_Form->FG_EDITION_CLAUSE = str_replace("%id", "{$id}", $HD_Form->FG_EDITION_CLAUSE);
}
if (!isset($form_action)) {
    $form_action = "list";
}
Exemplo n.º 28
0
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include '../lib/agent.defines.php';
include '../lib/agent.module.access.php';
include '../lib/Form/Class.FormHandler.inc.php';
include './form_data/FG_var_friend.inc';
include '../lib/agent.smarty.php';
if (!has_rights(ACX_CUSTOMER)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
if ($form_action == "add_sip" || $atmenu == "sip" || $form_action == "add_iax" || $atmenu == "iax") {
    if (!has_rights(ACX_VOIPCONF)) {
        Header("HTTP/1.0 401 Unauthorized");
        Header("Location: PP_error.php?c=accessdenied");
        die;
    }
}
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
/********************************* ADD SIP / IAX FRIEND ***********************************/
getpost_ifset(array("id_cc_card", "cardnumber", "useralias"));
if (isset($id_cc_card) && is_numeric($id_cc_card) != "" && ($form_action == "add_sip" || $form_action == "add_iax")) {
    $HD_Form->FG_GO_LINK_AFTER_ACTION = "A2B_entity_card.php?atmenu=card&stitle=Customers_Card&id=";
    if ($form_action == "add_sip") {
        $friend_param_update = " sip_buddy='1' ";
        if (!USE_REALTIME) {
            $key = "sip_changed";
Exemplo n.º 29
0

include ("../lib/agent.defines.php");
include ("../lib/agent.module.access.php");
include ("../lib/Form/Class.FormHandler.inc.php");
include ("../lib/epayment/classes/payment.php");
include ("../lib/epayment/classes/order.php");
include ("../lib/epayment/classes/currencies.php");
include ("../lib/epayment/includes/general.php");
include ("../lib/epayment/includes/html_output.php");
include ("../lib/epayment/includes/loadconfiguration.php");
include ("../lib/epayment/includes/configure.php");
include ("../lib/agent.smarty.php");


if (!has_rights(ACX_ACCESS)) {
	Header("HTTP/1.0 401 Unauthorized");
	Header("Location: PP_error.php?c=accessdenied");
	die();
}

$currencies_list = get_currencies();
$two_currency = false;
if (!isset ($currencies_list[strtoupper($_SESSION['currency'])][2]) || !is_numeric($currencies_list[strtoupper($_SESSION['currency'])][2])) {
	$mycur = 1;
} else {
	$mycur = $currencies_list[strtoupper($_SESSION['currency'])][2];
	$display_currency = strtoupper($_SESSION['currency']);
	if (strtoupper($_SESSION['currency']) != strtoupper(BASE_CURRENCY))
		$two_currency = true;
}
Exemplo n.º 30
0
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *
**/
include './lib/customer.defines.php';
include './lib/customer.module.access.php';
include './lib/Form/Class.FormHandler.inc.php';
include './form_data/FG_var_voucher.inc';
include './lib/customer.smarty.php';
if (!has_rights(ACX_VOUCHER)) {
    Header("HTTP/1.0 401 Unauthorized");
    Header("Location: PP_error.php?c=accessdenied");
    die;
}
$HD_Form->setDBHandler(DbConnect());
$HD_Form->init();
$currencies_list = get_currencies();
if (strlen($voucher) > 0) {
    if (is_numeric($voucher)) {
        sleep(2);
        $FG_VOUCHER_TABLE = "cc_voucher";
        $FG_VOUCHER_FIELDS = "voucher, credit, activated, tag, currency, expirationdate";
        $instance_sub_table = new Table($FG_VOUCHER_TABLE, $FG_VOUCHER_FIELDS);
        $FG_TABLE_CLAUSE_VOUCHER = "expirationdate >= CURRENT_TIMESTAMP AND activated='t' AND voucher='{$voucher}'";
        $list_voucher = $instance_sub_table->Get_list($HD_Form->DBHandle, $FG_TABLE_CLAUSE_VOUCHER, $order, $sens, null, null, $limite, $current_record);