示例#1
0
<?php

/**
 * Add/Update File For Language Label
 *
 * @package		addlanguagelebel.inc.php
 * @section		main/general
 * @author		Snehasis Mohapatra
*/
if (!isset($langLabObj)) {
    include_once SITE_CLASS_APPLICATION . "class.LanguageLable.php";
    $langLabObj = new LanguageLable();
}
$gdbobj->getRequestVars();
$view = GetVar("view");
$iLabelId = GetVar("iLabelId");
$actionfile = GetVar("file");
$arr = array();
if (count($_POST) > 0) {
    $arr[0] = $_POST;
} else {
    if ($view == 'edit') {
        $arr = $langLabObj->getLangLableDetail("*", "AND iLabelId = '{$iLabelId}'");
        //prints($arr);exit;
    } else {
        $view = "add";
    }
}
$arr[0]['eStatus'] = isset($arr[0]['eStatus']) ? $arr[0]['eStatus'] : '';
$arr[0]['vName'] = isset($arr[0]['vName']) ? $arr[0]['vName'] : '';
$arr[0]['vValue_en'] = isset($arr[0]['vValue_en']) ? $arr[0]['vValue_en'] : '';
示例#2
0
<?php

/**
 * Action file for add/Update of Language
 *
 * @package		addlanguage_a.php
 * @section		action/general
 * @author		Snehasis Mohapatra
 */
require_once SITE_FUNC . "language.inc.php";
if (!isset($langLabObj)) {
    include_once SITE_CLASS_APPLICATION . "class.LanguageLable.php";
    $langLabObj = new LanguageLable();
}
$view = PostVar("view");
$Data = PostVar("Data");
$iLabelId = PostVar("iLabelId");
$actionfile = GetVar("file");
$fieldsName = array("vValue");
$multiData = $dbobj->getAlterTable('' . PRJ_DB_PREFIX . '_lang_lable', $fieldsName, $Data);
$Data['dDate'] = date("Y-m-d H:i:s");
/** This is for Check Duplicate Record-------------------------------------------*/
$generalobj->getRequestVars();
$redirect_file = "index.php?file={$file}&view={$view}&iLabelId={$iLabelId}";
$generalobj->checkDuplicate('iLabelId', PRJ_DB_PREFIX . "_lang_lable", array('vName' => $Data['vName']), $redirect_file, LABLE_ALREADY_EXISTS, $iLabelId);
if ($view == "add") {
    //prints($Data);exit;
    $langLabObj->setAllVar($Data);
    $result = $langLabObj->insert();
    if ($result) {
        $var_msg = "Record Added Successfully.";