Пример #1
0
<?php

/**
 * Add/Update File For Security Question
 * @package		addsecurityquestion.inc.php
 * @Section		general
 */
if (!isset($secQueObj)) {
    include_once SITE_CLASS_APPLICATION . "class.SecQuestion.php";
    $secQueObj = new SecQuestion();
}
$gdbobj->getRequestVars();
$view = GetVar("view");
$iQuestionId = GetVar("iQuestionId");
$actionfile = GetVar("file");
$arr = array();
if (count($_POST) > 0) {
    $arr[0] = $_POST;
} else {
    if ($view == 'edit') {
        $arr = $secQueObj->select($iQuestionId);
        //prints($arr);//exit;
    } else {
        $view = "add";
    }
}
$lang = $gdbobj->getLanguage();
?>
<form name="frmadd" id="frmadd" action="index.php?file=<?php 
echo $actionfile;
?>
Пример #2
0
<?php

/**
 * Action file for add/Update of Country
 * @Created Date :3rd-july-08.
 * @package		addcountry_a.php
 * @section		action/general
 * @author		Pradip Kumar Dash
 */
if (!isset($secQueObj)) {
    include_once SITE_CLASS_APPLICATION . "class.SecQuestion.php";
    $secQueObj = new SecQuestion();
}
$view = PostVar("view");
$Data = PostVar("Data");
$iQuestionId = PostVar("iQuestionId");
$actionfile = GetVar("file");
/** This is for Check Duplicate Record-------------------------------------------*/
$generalobj->getRequestVars();
$redirect_file = "index.php?file={$file}&view={$view}&iQuestionId={$iQuestionId}";
$generalobj->checkDuplicate('iQuestionId', PRJ_DB_PREFIX . "_sec_question", array('tQuestion' => $Data['tQuestion']), $redirect_file, COUNTRY_ALREADY_EXISTS, $iQuestionId);
if ($view == "add") {
    //prints($Data);exit;
    $secQueObj->setAllVar($Data);
    $id = $secQueObj->insert();
    if ($id) {
        $var_msg = "Record Added Successfully.";
    } else {
        $var_msg = "Eror-in Add.";
    }
} else {
Пример #3
0
<?php

include S_SECTIONS . "/member/memberaccess.php";
if (!isset($orgUserObj)) {
    include_once SITE_CLASS_APPLICATION . "user/class.OrganizationUser.php";
    $orgUserObj = new OrganizationUser();
}
if (!isset($secquesObj)) {
    include_once SITE_CLASS_APPLICATION . "class.SecQuestion.php";
    $secquesObj = new SecQuestion();
}
//prints($_GET);exit;
$num = $_GET['n'];
$iUserId = $_GET['id'];
//prints($iUserId); exit;
if ($_POST) {
    $iUserId = PostVar('iUserId');
    $num = PostVar('qnum');
    $ans = PostVar('answer');
    // $vPassword = $generalobj->encrypt($Data['vPassword']);
    $fld = '';
    if ($num == 1) {
        $fld = 'vAnswer';
    } else {
        if ($num == 2) {
            $fld = 'vAnwser';
        }
    }
    $where = "iUserId={$iUserId}";
    $data = array($fld => $ans);
    $id = $dbobj->MySQLQueryPerform(PRJ_DB_PREFIX . "_organization_user", $data, 'update', $where);