<?php
    class TRA_NEWTICKET extends TRA
    {
        public function tra_newticket_javainit()
        {

        }

        public function fn_newticket_init()
        {
            if(isset($_REQUEST['task'])){$task=trim(strtolower($_REQUEST['task']));}
            if(isset($_POST['task'])){$task=trim(strtolower($_POST['task']));}
            if($_REQUEST||$_POST){if($_REQUEST['sec']||$_POST['sec']){$task=$this->dec($task);}}

            switch($task)
            {
                case "default":
                    $this->fn_default_newticket();
                break;

                case $task:
                    $task="fn_".$task;
                    if(method_exists($this,$task)){$this->$task();}
                break;

                default:
                    $this->fn_default_newticket();
                break;
            }
        }
        public function fn_default_newticket()
        {
            echo $this->FN_CREATEHEADER();

            echo "<style>
                      .besidebtnsave {margin-left:104px;margin-top:-6px;position:absolute;}
                      .besidebtnupdate {margin-left:198px;margin-top:-6px;position:absolute;}
                      .besidebtndelete {margin-left:288px;margin-top:-6px;position:absolute;}
                  </style>";
            echo "<script>
                       var myForm,myFormsearch,dgtra;
                       function initObject()
                       {
                           myTabbar.tabs(\"a1\").setActive();
                           var a2=myTabbar.tabs(\"a2\");
                           url=fn_dhtmlxloadobject('".$this->enc("obj_tra")."','obj=".$this->enc("tra_cargticket")."&task=".$this->enc("default")."&tabid=tabcarg2');
                           a2.attachURL(url);";

            echo "     }

                       function fn_grid_loaddata()
                       {";

            echo "     }
                   </script>";
            echo $this->FN_CLOSEHEADER();
            echo $this->FN_CREATEBODY("e8f1ff");

            echo "<div id=\"myTabbar\" class=\"dhtmlxTabBar\" style=\"width:80%; height:700px;\" oninit=\"initObject()\" align=\"left\">
                      <div id=\"a1\" name=\"Passenger\"></div>
                      <div id=\"a2\" name=\"Cargo\"></div>
                  </div>";
            echo $this->FN_CREATEFOOTER();

        }
    }
?>