<?php include_once $CFG->dirroot . "/lib/classes/" . "application/AudioCategory.Class.php5"; $audiocategoryObj = new AudioCategory(); $GeneralObj->getRequestVars(); $section = 'Audio Category'; $mode = $_REQUEST['mode']; if ($mode == "Update") { $audiocategoryObj->select($iAudioCategoryId); $audiocategoryObj->getAllVar(); } else { $mode = "Add"; } if ($file != '') { $link = "index.php?file=" . $file . "&mode=" . $mode . "&listfile=" . $listfile; } $TOP_HEADER = $mode . ' ' . $section; if ($mode == 'Update') { $TOP_HEADER .= ' [' . $vCategoryName . ']'; } ?> <form name="frmadd" method="post" enctype="multipart/form-data" action="index.php?file=m-audiocategoryadd_a"> <input type="hidden" id="mode" name="mode" value="<?php echo $mode; ?> "> <input type="hidden" id="SAMPM" name="SAMPM" value="<?php echo $SAMPM; ?> "> <input type="hidden" id="EAMPM" name="EAMPM" value="<?php
<?php include_once $CFG->dirroot . "/lib/classes/" . "application/AudioCategory.Class.php5"; $audiocategoryObj = new AudioCategory(); $dCreated = date('Y-m-d H:i:s'); $GeneralObj->getRequestVars(); $audiocategoryObj->setAllVar(); if ($_SESSION["sess_eType"] == "3") { $iCompanyId = $_SESSION['sess_iCompanyId']; $qs = '&iSGroupId=' . $iSGroupId; } else { if ($_SESSION['sess_eType'] == 'Group Admin') { $iCompanyId = $_SESSION['sess_iCompanyId']; $iSGroupId = $_SESSION['sess_iSGroupId']; $qs = ''; } else { $qs = '&iCompanyId=' . $iCompanyId . '&iSGroupId=' . $iSGroupId; } } if ($mode == "Add") { # echo "<pre>"; print_r($_FILES) ; exit; $redirect_file = "index.php?file=m-audiocategoryadd" . $qs; $GeneralObj->checkDuplicate('iAudioCategoryId', 'AudioCategory', array('vCategoryName', 'iSGroupId'), $redirect_file, "Category Already Exists ", $iSGroupId, ' and '); // $audiocategoryObj->setdCreated($dCreated); $audiocategoryObj->setiSGroupId($iSGroupId); $iAudioCategoryId = $audiocategoryObj->insert(); //$audiocategoryObj->insert(); $msg = MSG_ADD; // $url='index.php?file=AudioCategory&AX=Yes&var_msg='.$msg; $url = 'index.php?file=AudioCategory&AX=Yes' . $qs . '&var_msg=' . $msg; header("Location:" . $url);