<?php

include_once "system.php";
include_once 'class/DebitCreditNote.php';
include_once 'class/DebitCreditNoteLine.php';
//include_once 'class/SelectCtrl.php';
include_once "../simantz/class/datepicker/class.datepicker.php";
//include_once "../system/class/Period.php";
include_once '../simantz/class/Currency.inc.php';
$cur = new Currency();
$dp = new datepicker($url);
$dp->dateFormat = 'Y-m-d';
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
$o = new DebitCreditNote();
$pl = new DebitCreditNoteLine();
$s = new XoopsSecurity();
//$ctrl= new SelectCtrl();
$orgctrl = "";
$action = "";
$o->debitcreditnote_id = 0;
if (isset($_POST['action'])) {
    $action = $_POST['action'];
    $o->debitcreditnote_id = $_POST["debitcreditnote_id"];
} elseif (isset($_GET['action'])) {
    $action = $_GET['action'];
    $o->debitcreditnote_id = $_GET["debitcreditnote_id"];
} else {
    $action = "";
}
$token = $_POST['token'];
$o->document_no = $_POST["document_no"];
$modversion['config'][4]['valuetype'] = 'int';
$modversion['config'][4]['default'] = 10;
$modversion['config'][5]['name'] = 'imgsnumber';
$modversion['config'][5]['title'] = '_MI_RMC_IMGSNUMBER';
$modversion['config'][5]['description'] = '';
$modversion['config'][5]['formtype'] = 'textbox';
$modversion['config'][5]['valuetype'] = 'int';
$modversion['config'][5]['default'] = 20;
// Secure Key
$modversion['config'][6]['name'] = 'secretkey';
$modversion['config'][6]['title'] = '_MI_RMC_SECREY';
$modversion['config'][6]['description'] = '_MI_RMC_SECREYD';
$modversion['config'][6]['formtype'] = 'textbox';
$modversion['config'][6]['valuetype'] = 'text';
if (!isset($xoopsSecurity)) {
    $xoopsSecurity = new XoopsSecurity();
}
$modversion['config'][6]['default'] = $xoopsSecurity->createToken();
// Formato HTML5
$modversion['config'][7]['name'] = 'dohtml';
$modversion['config'][7]['title'] = '_MI_RMC_DOHTML';
$modversion['config'][7]['description'] = '';
$modversion['config'][7]['formtype'] = 'yesno';
$modversion['config'][7]['valuetype'] = 'int';
$modversion['config'][7]['default'] = 1;
$modversion['config'][8]['name'] = 'dosmileys';
$modversion['config'][8]['title'] = '_MI_RMC_DOSMILE';
$modversion['config'][8]['description'] = '';
$modversion['config'][8]['formtype'] = 'yesno';
$modversion['config'][8]['valuetype'] = 'int';
$modversion['config'][8]['default'] = 1;
Exemple #3
0
<?php

include_once "system.php";
//include_once 'class/Log.php';
include_once '../simantz/class/Region.php.inc';
//include_once 'class/Employee.php';
include_once "menu.php";
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
//$log = new Log();
$o = new Region($xoopsDB, $tableprefix, $log);
$s = new XoopsSecurity($xoopsDB, $tableprefix, $log);
//$e = new Employee($xoopsDB,$tableprefix,$log);
$action = "";
echo <<<EOF
<script type="text/javascript">
\tfunction autofocus(){

\t\tdocument.forms['frmRegion'].region_name.focus();
\t}

\tfunction validateRegion(){
\t\tvar name=document.forms['frmRegion'].region_name.value;

\t\tif(confirm('Save Record?')){
\t\tif(name =="" ){
\t\t\talert("Please make sure 'Region Name' is filled in.");
\t\t\treturn false;
\t\t}
\t\telse
\t\t\treturn true;
\t\t}
//                                                                           //
//  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 General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
if (!defined("XOOPS_MAINFILE_INCLUDED")) {
    exit;
} else {
    //Instantiate security object
    require_once XOOPS_ROOT_PATH . "/class/xoopssecurity.php";
    $xoopsSecurity = new XoopsSecurity();
    global $xoopsSecurity;
    //Check super globals
    $xoopsSecurity->checkSuperglobals();
    // ############## Activate error handler ##############
    //include_once XOOPS_ROOT_PATH . '/class/errorhandler.php';
    //$xoopsErrorHandler =& XoopsErrorHandler::getInstance();
    // Turn on error handler by default (until config value obtained from DB)
    //$xoopsErrorHandler->activate(true);
    define("XOOPS_SIDEBLOCK_LEFT", 0);
    define("XOOPS_SIDEBLOCK_RIGHT", 1);
    define("XOOPS_SIDEBLOCK_BOTH", 2);
    define("XOOPS_CENTERBLOCK_LEFT", 3);
    define("XOOPS_CENTERBLOCK_RIGHT", 4);
    define("XOOPS_CENTERBLOCK_CENTER", 5);
    define("XOOPS_CENTERBLOCK_ALL", 6);
<?php

include_once "admin_header.php";
xoops_cp_header();
include 'system.php';
include_once '../class/Log.inc.php';
include_once '../class/SelectCtrl.inc.php';
include_once '../class/Organization.inc.php';
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
$log = new Log();
$o = new Organization();
$s = new XoopsSecurity();
$ctrl = new SelectCtrl();
$action = "";
echo <<<EOF
<script type="text/javascript">
\tfunction validateOrganization(){
\t\tvar name=document.forms['frmOrganzation'].organization_name.value;
\t\tvar code=document.forms['frmOrganzation'].organization_code.value;
\t\tif(confirm("Save record?"))
\t\t\treturn true;
\t\telse
\t\t\treturn false;
\t}
\t
</script>

EOF;
if (isset($_POST['action'])) {
    $action = $_POST['action'];
    $o->organization_id = $_POST["organization_id"];
<?php

include "system.php";
include "menu.php";
include_once 'class/Log.php';
include_once 'class/Country.php';
$log = new Log();
$o = new Country($xoopsDB, $tableprefix, $log);
$s = new XoopsSecurity($xoopsDB, $tableprefix, $log);
$orgctrl = "";
$action = "";
echo <<<EOF
<script type="text/javascript">
function IsNumeric(sText)
{
   var ValidChars = "0123456789.-";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
   }
$cu_settings['config'][] = array('name' => 'lang', 'title' => __('Language to use', 'rmcommon'), 'description' => '', 'formtype' => 'cu-language', 'valuetype' => 'text', 'default' => 'en', 'category' => 'general');
$cu_settings['config'][] = array('name' => 'theme', 'title' => __('Admin theme', 'rmcommon'), 'description' => '', 'formtype' => 'cu-theme', 'valuetype' => 'text', 'default' => 'helium', 'category' => 'appearance');
$cu_settings['config'][] = array('name' => 'gui_disable', 'title' => __('Disable new GUI when working on non native modules?', 'rmcommon'), 'description' => '', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, 'category' => 'appearance');
// Editor
$cu_settings['config'][] = array('name' => 'editor_type', 'title' => __('Select the default editor', 'rmcommon'), 'description' => '', 'formtype' => 'select', 'valuetype' => 'text', 'default' => 'tiny', 'options' => array(__('Visual Editor', 'rmcommon') => 'tiny', __('HTML Editor', 'rmcommon') => 'html', __('Simple Editor', 'rmcommon') => 'simple', __('Markdown Editor', 'rmcommon') => 'markdown'), 'category' => 'general');
$cu_settings['config'][] = array('name' => 'markdown', 'title' => __('Parse MarkDown', 'rmcommon'), 'description' => __('This option enables the parsing for Markdown code for text. Must be enabled when "Markdown Editor" is selected.', 'rmcommon'), 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, 'category' => 'general');
// JQuery inclusion
$cu_settings['config'][] = array('name' => 'jquery', 'title' => __('Enable JQuery for front end', 'rmcommon'), 'description' => __('When this option is enabled, Common Utilities will include JQuery automatically. Please, disable this option only when your theme include jquery by default.', 'rmcommon'), 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => '0', 'category' => 'general');
// Images store type
$cu_settings['config'][] = array('name' => 'imagestore', 'title' => __('Arrange images by date', 'rmcommon'), 'description' => '', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, 'category' => 'general');
// Images Categories list limit number
$cu_settings['config'][] = array('name' => 'catsnumber', 'title' => __('Limit for image categories list.', 'rmcommon'), 'description' => '', 'formtype' => 'textbox', 'valuetype' => 'int', 'default' => 10, 'category' => 'general');
$cu_settings['config'][] = array('name' => 'imgsnumber', 'title' => __('Image manager: number of images per page', 'rmcommon'), 'description' => '', 'formtype' => 'textbox', 'valuetype' => 'int', 'default' => 20, 'category' => 'general');
// Secure Key
if (!isset($xoopsSecurity)) {
    $xoopsSecurity = new XoopsSecurity();
}
$cu_settings['config'][] = array('name' => 'secretkey', 'title' => __('Secret Key', 'rmcommon'), 'description' => __('Provide a secret key used to encrypt information.', 'rmcommon'), 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => defined('RMCPATH') ? '' : $xoopsSecurity->createToken(), 'category' => 'general');
// Formato HTML5
$cu_settings['config'][] = array('name' => 'dohtml', 'title' => __('Allow HTMl in text', 'rmcommon'), 'description' => '', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, 'category' => 'appearance');
$cu_settings['config'][] = array('name' => 'dosmileys', 'title' => __('Allow smilies in text', 'rmcommon'), 'description' => '', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, 'category' => 'appearance');
$cu_settings['config'][] = array('name' => 'doxcode', 'title' => __('Allow XoopsCode', 'rmcommon'), 'description' => '', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, 'category' => 'appearance');
$cu_settings['config'][] = array('name' => 'doimage', 'title' => __('Allow images in text', 'rmcommon'), 'description' => '', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0, 'category' => 'appearance');
$cu_settings['config'][] = array('name' => 'dobr', 'title' => __('Auto add line breaks in text', 'rmcommon'), 'description' => '', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0, 'category' => 'appearance');
$cu_settings['config'][] = array('name' => 'mods_number', 'title' => __('Modules number on dashboard', 'rmcommon'), 'description' => '', 'formtype' => 'textbox', 'valuetype' => 'int', 'default' => 6, 'category' => 'appearance');
$cu_settings['config'][] = array('name' => 'rssimage', 'title' => __('Image for RSS feeds', 'rmcommon'), 'description' => '', 'formtype' => 'textbox', 'valuetype' => 'text', 'default' => XOOPS_URL . '/modules/rmcommon/images/rssimage.png', 'category' => 'appearance');
// Comments
$cu_settings['config'][] = array('name' => 'enable_comments', 'title' => __('Enable comments', 'rmcommon'), 'description' => '', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, 'category' => 'comments');
$cu_settings['config'][] = array('name' => 'anonymous_comments', 'title' => __('Allow anonymous users to post comments', 'rmcommon'), 'description' => '', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, 'category' => 'comments');
$cu_settings['config'][] = array('name' => 'approve_reg_coms', 'title' => __('Automatically approve comments by registered users', 'rmcommon'), 'description' => '', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 1, 'category' => 'comments');
$cu_settings['config'][] = array('name' => 'approve_anon_coms', 'title' => __('Automatically approve comments by anonymous users', 'rmcommon'), 'description' => '', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0, 'category' => 'comments');
Exemple #8
0
<?php

include "system.php";
include "menu.php";
include_once 'class/Log.php';
include_once 'class/BPartner.php';
include_once 'class/SelectCtrl.php';
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
$log = new Log();
$o = new BPartner();
$s = new XoopsSecurity();
$ctrl = new SelectCtrl();
$orgctrl = "";
$action = "";
//marhan add here --> ajax
echo "<iframe src='bpartner.php' name='nameValidate' id='idValidate' style='display:none' ></iframe>";
echo "<div id='simit'><form name='frmValidate' target='nameValidate' method='POST'></form></div>";
////////////////////
echo <<<EOF
<A href='bpartner.php' style='color: GRAY'> [ADD NEW BUSINESS PARTNER]</A>
<A href='bpartner.php?action=search' style='color: gray'> [SEARCH BUSINESS PARTNER]</A>
<br>
<script type="text/javascript">

function sortList(idSort){

\tvar str = document.getElementById(idSort).src;
\tvar lengthStr = str.length;
\tvar type = str.substring(lengthStr-6,lengthStr-4);
\tvar fldName = idSort.replace("ids_", "");
\tvar wherestr = document.forms['frmSearchForm'].wherestr.value;
Exemple #9
0
<?php

include "system.php";
include "menu.php";
include_once 'class/Contacts.php.inc';
include_once '../system/class/Log.php';
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
//global $log ;
$o = new Contacts();
$s = new XoopsSecurity();
//$ctrl= new SelectCtrl();
$orgctrl = "";
$action = "";
echo <<<EOF
<script type="text/javascript">

\tfunction gotoAction(action){
\tdocument.forms['frmContacts'].action.value = action;
\tdocument.forms['frmContacts'].submit();
\t}


function IsNumeric(sText)
{
   var ValidChars = "0123456789.-";
   var IsNumber=true;
   var Char;


   for (i = 0; i < sText.length && IsNumber == true; i++)
      {
Exemple #10
0
<?php

include "system.php";
include "menu.php";
include_once 'class/FollowUp.php.inc';
include_once '../system/class/Log.php';
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
include_once "../../class/datepicker/class.datepicker.php";
//include_once "../system/class/Period.php";
$dp = new datepicker($url);
//global $log ;
$o = new FollowUp();
$s = new XoopsSecurity();
//$ctrl= new SelectCtrl();
$orgctrl = "";
$action = "";
echo <<<EOF
<script type="text/javascript">

\tfunction gotoAction(action){
\tdocument.forms['frmFollowUp'].action.value = action;
\tdocument.forms['frmFollowUp'].submit();
\t}


function IsNumeric(sText)
{
   var ValidChars = "0123456789.-";
   var IsNumber=true;
   var Char;