Example #1
0
        <h1>ชนิดงานซ่อม</h1>

		  <?php 
form_head("admin/maintain_add", "เพิ่มชนิดงานซ่อมใหม่");
?>
		        	<?php 
$rows = $this->db->get("material_categories")->result_array();
select_field("category_id", "หมวด", $rows, "category_name", null, 1);
?>
          <?php 
text_field("maintain_name", "ชื่องานซ่อมใหม่", null, 1);
?>
           <?php 
area_field("remark", "หมายเหตุ", null, 1);
?>
         
          <?php 
form_footer();
?>
          
		
         
		


   
Example #2
0
<h1>ข้อมูลส่วนตัว</h1>
      <?php 
echo $this->user->messages();
?>
		 <?php 
form_head("admin/user_edit2/", "แก้ไข");
?>
		 

           
		 

          <?php 
text_field("firstname", "ชื่อจริง", $row, 0, "even");
?>
          <?php 
text_field("lastname", "นามสกุล", $row, 1);
?>
          <?php 
text_field("email", "อีเมล์", $row, 1, "even");
?>
           <?php 
text_field("tel", "เบอร์โทร", $row, 1);
?>
          <?php 
text_field("position", "ตำแหน่ง", $row, 1, "even");
?>

	
	 <?php 
form_footer();
Example #3
0
function include_register1_text()
{
    $strHost = $GLOBALS['Host'];
    $strCopyright = $GLOBALS['OrkfiaCopyright'];
    include_once 'inc/classes/clsGame.php';
    $objGame = new clsGame();
    $strTribeSwitch = $objGame->get_game_switch(TRIBE_CREATION);
    $strAllianceSwitch = $objGame->get_game_switch(ALLIANCE_CREATION);
    $strBootcampSwitch = $objGame->get_game_switch(BOOTCAMP_SIGNUPS);
    $link = "main.php?cat=main&amp;page=register1&amp;alliance_type=";
    if (!isset($_GET['alliance_type'])) {
        //======================================================================
        // Signup selection (first part) of registration page
        //======================================================================
        ?>
    <div id="text" style="margin: 15px auto; width: 600px;">

        <h2 style="margin: 15px auto; text-align: center;"><img src="<?php 
        echo $strHost;
        ?>
first_sign_up.gif" alt="ORKFiA Sign Up!" /></h2>

        <h3>Join an Alliance</h3>

        <p>If you have the password of an existing alliance you may join in by
        selecting <em>Join Friends</em>, otherwise <em>Join Random</em> is the
        recommended choice. You can merge any time later if you wish to move
        into another alliance.</p>

<?php 
        if ($strTribeSwitch == ON) {
            echo "<p>| <a href=\"" . $link . "random\">Join Random</a> ";
            echo "| <a href=\"" . $link . "existing\">Join Friends</a> |</p>";
        } else {
            echo "<p><em class=\"positive\">The option to join an alliance has temporarily been disabled.</em></p>";
        }
        ?>

        <h3>Join a Bootcamp</h3>

        <p>Bootcamp leaders will assist you here, answering questions and
        teaching you how to master the game. If you wish to lead or instruct a
        boot camp, contact staff in alliance (#3).</p>
<?php 
        // M: For some reason this stopped working with the new MySQL server
        //         $strSQL = "SELECT kingdom, COUNT(*) as num_players FROM stats GROUP BY kingdom HAVING kingdom IN(SELECT id as kingdom FROM kingdom WHERE bootcamp = 'yes') ORDER BY kingdom DESC";
        //         $resSQL = mysql_query($strSQL);
        $iOpenBootcamps = 0;
        $iSpotsOpen = 0;
        $strSQL = "SELECT id FROM " . TBL_ALLIANCE . " WHERE bootcamp = 'yes' ORDER BY id DESC";
        $resSQL = mysql_query($strSQL);
        while ($arrRES = mysql_fetch_array($resSQL)) {
            $strSQL = "SELECT COUNT(*), " . ALLIANCE . " FROM stats WHERE " . ALLIANCE . " = {$arrRES[ID]} GROUP BY " . ALLIANCE . " ORDER BY " . ALLIANCE . " DESC";
            $resSQL2 = mysql_query($strSQL);
            $arrRES2 = mysql_fetch_row($resSQL2);
            if ($arrRES2[0] < MAX_ALLIANCE_SIZE) {
                $iOpenBootcamps++;
                $iLowestAlliNr = $arrRES2[1];
                $iSpotsOpen = MAX_ALLIANCE_SIZE - $arrRES2[0];
            }
        }
        //         $iOpenBootcamps = 0;
        //         while ($arrRES = mysql_fetch_array($resSQL))
        //         {
        //             if ($arrRES['num_players'] < MAX_ALLIANCE_SIZE)
        //             {
        //                 $iOpenBootcamps++;
        //                 $iLowestAlliNr = $arrRES['kingdom'];
        //                 $iSpotsOpen = MAX_ALLIANCE_SIZE - $arrRES['num_players'];
        //             }
        //         }
        if ($strBootcampSwitch == OFF) {
            ?>
        <p><em class="positive">The option to join a bootcamp has temporarily been disabled.</em></p>
<?php 
        } elseif ($iOpenBootcamps == 0) {
            ?>
        <p><em class="positive">Sorry, currently there are no bootcamps available.</em></p>
<?php 
        } else {
            ?>
        <p>| <a href="<?php 
            echo $link;
            ?>
random&amp;bootcamp=yes">Join Bootcamp</a> | <em>Bootcamp (#<?php 
            echo $iLowestAlliNr;
            ?>
) accepts <?php 
            echo $iSpotsOpen;
            ?>
 more tribes</em></p>
<?php 
        }
        ?>
        <h3>Create an Alliance</h3>

        <p>Recommended if you plan on joining with more than 5 other players as
        the world of Orkfia is a very competitive place. Small alliances tend
        not to lead to greatness.</p>

        <p>

<?php 
        $iEmptyAllianceId = check_empty_alliances();
        if ($strAllianceSwitch == ON && $strTribeSwitch == ON && $iEmptyAllianceId > 0) {
            echo "| <a href=\"" . $link . "new\">Create an Alliance</a> |" . " <em>Alliance (#{$iEmptyAllianceId}) is available</em>";
        } elseif ($iEmptyAllianceId == 0) {
            echo '<em class="positive">Sorry, the option to create an alliance is currently unavailable. (Maximum of ' . MAX_ALLIANCES . ' alliances reached)</em>';
        } else {
            echo '<em class="positive">Alliance creation has temporarily been disabled.</em>';
        }
        ?>

        </p>
    </div>

    <div class="center" style="font-size: 0.8em"><?php 
        echo $strCopyright;
        ?>
</div>

<?php 
    } else {
        //======================================================================
        // Form fields of registration page
        //======================================================================
        ?>

    <div id="text" style="margin: 15px auto; width: 600px;">
        <h2 style="margin: 15px auto; text-align: center;"><img src="<? echo $strHost; ?>first_sign_up.gif" alt="ORKFiA Sign Up!" /></h2>

<?php 
        if (isset($_GET['bootcamp']) && $_GET['bootcamp'] == 'yes') {
            $bootcamp = $_GET['bootcamp'];
        } else {
            $bootcamp = 'no';
        }
        // Validate alliance type input on creation
        $iEmptyAllianceId = check_empty_alliances();
        $strAllianceType = strval($_GET['alliance_type']);
        if ($strAllianceType == 'new' && ($strAllianceSwitch == OFF || $iEmptyAllianceId == 0 || $bootcamp == 'yes')) {
            $strAllianceType = 'random';
        }
        form_head($strAllianceType);
        switch ($strAllianceType) {
            case "random":
                echo "<input type=\"hidden\" value=\"{$bootcamp}\" name=\"register[bootcamp]\" />";
                break;
            case "existing":
                form_join_friends();
                // join existing
                break;
            case "new":
                form_create_alliance();
                // create alliance
                break;
        }
        form_login_info();
        form_tribe_info();
        form_agreement();
        form_random();
        form_post();
        ?>

        </div>

<?php 
    }
}
Example #4
0
<h1>ชนิดผู้ใช้งาน</h1>
		 <?php 
form_head("admin/user_role_edit/" . $role["role_id"], "แก้ไข");
?>
		 		 <table class="list" style="width:400px;" >
 
          <?php 
text_field("role_name", "ชื่อกลุ่มผู้ใช้งาน", $role, 1, "even");
?>
          
	



         <?php 
function notify_cheak($id, $row)
{
    $arr = explode(",", $row["notify"]);
    foreach ($arr as $item) {
        if ($item == $id) {
            return true;
        }
    }
}
function controller_cheak($c_id, $row)
{
    $arr = explode(",", $row["controller_access"]);
    foreach ($arr as $item) {
        if ($item == $c_id) {
            return true;
        }
Example #5
0
        <h1>ห้องหรือสถานที่</h1>

   
    

		  <?php 
form_head("admin/room_edit/" . $row["place_id"], "แก้ไขห้องหรือสถานที่ใหม่");
?>
          <?php 
text_field("place_name", "ชื่อห้อง/สถานที่", $row, 1);
?>
         
         
          <?php 
form_footer();
?>
          
Example #6
0
function album_edit($id)
{
    global $CRUD, $album_fields;
    $album = fetch_album($id);
    // get the album from the database
    if (!$album) {
        message("Album not found.");
        main_page();
    }
    foreach ($album_fields as $f) {
        if ($f == 'released') {
            $CRUD['A' . $f] = fill_album_released_date($album[$f]);
        } else {
            $CRUD['A' . $f] = $album[$f];
        }
    }
    form_head('Edit Album');
    button('album_update', ' Update ');
    button('done', ' Done ');
    hidden('a', 'album_update');
    hidden('id', $id);
    display_tracks($id);
    page('main');
}
Example #7
0
      <h1>ครุภัณฑ์</h1>



  <?php 
form_head("admin/material_add", "เพิ่มครุภัณใหม่");
?>
          <?php 
text_field("name", "ชื่อครุภัณฑ์", null, 0);
?>
          <?php 
text_field("code", "รหัสครุภัณ์", null, 0);
?>
          <?php 
text_field("brand", "ยี้ห้อ", null, 1);
?>
          <?php 
text_field("buy_date", "วันที่ซื้อ", null, 0, "date");
?>
          <?php 
text_field("model", "รุ่น", null, 0);
?>
          <?php 
text_field("buy_price", "ราคาซื้อ", null, 1);
?>
          <?php 
text_field("warranty", "การรับประกัน", null, 1, "width800");
?>
         
         	<?php 
$rows = $this->db->query("select budget_id, concat(budget_name,'-', year) as budget_name from budgets")->result_array();
Example #8
0
<h1>ชนิดผู้ใช้งาน</h1>
		 <?php 
form_head("admin/user_role_add/", "เพิ่มใหม่");
?>
		 		 <table class="list" style="width:400px;" >
 
          <?php 
text_field("role_name", "ชื่อกลุ่มผู้ใช้งาน", null, 1, "even");
?>
          
	
	</table>
	

        
     <?php 
$con_groups = $this->db->get("controller_groups")->result_array();
foreach ($con_groups as $item) {
    ?>
   
      
<table class="list" style="width:300px;">
          <tbody><tr class=" odd">
            <th ></th>
            <th><?php 
    echo $item["group_name"];
    ?>
</th>
            
          
           
Example #9
0
        <h1>บริษัท</h1>

		  <?php 
form_head("admin/company_edit/" . $row["company_id"], "แก้ไขบริษัท");
?>
          <?php 
text_field("company_name", "ชื่อบริษัท", $row, 1);
?>
          <?php 
text_field("tel", "เบอร์โทร", $row, 1);
?>
          <?php 
text_field("fax", "เบอร์FAx", $row, 1);
?>
          <?php 
text_field("email", "อีเมล์", $row, 1);
?>
          <?php 
area_field("address", "ที่อยู่", $row, 1);
?>
          <?php 
form_footer();
?>
          
		
         
		


   
Example #10
0
      <h1>ครุภัณฑ์</h1>



  <?php 
form_head("admin/materail_edit/" . $row["material_id"], "แก้ไขครุภัณใหม่");
?>
          <?php 
text_field("name", "ชื่อครุภัณฑ์", $row, 0);
?>
          <?php 
text_field("code", "รหัสครุภัณ์", $row, 0);
?>
          <?php 
text_field("brand", "ยี้ห้อ", $row, 1);
?>
          <?php 
text_field("buy_date", "วันที่ซื้อ", $row, 0, "date");
?>
          <?php 
text_field("model", "รุ่น", $row, 0);
?>
          <?php 
text_field("buy_price", "ราคาซื้อ", $row, 1);
?>
          <?php 
text_field("warranty", "การรับประกัน", $row, 1, "width800");
?>
         
         	<?php 
$rows = $this->db->query("select budget_id, concat(budget_name,'-', year) as budget_name from budgets")->result_array();
Example #11
0

		  <?php 
form_head("admin/budget_add/", "เพิ่มชนิดงบประมาณใหม่");
?>
          <?php 
text_field("budget_name", "ชื่อ", null, 1);
?>
          <?php 
text_field("year", "ปีการศึกษา", null, 1);
?>
         
          <?php 
form_footer();
?>
          
Example #12
0
      <h1>วัสดุ</h1>



  <?php 
form_head("admin/material_add2", "เพิ่มวัสดุใหม่");
?>
          <?php 
text_field("name", "ชื่อวัสดุ", null, 0);
?>
          
          <?php 
text_field("brand", "ยี้ห้อ", null, 1);
?>
          <?php 
text_field("buy_date", "วันที่ซื้อ", null, 0, "date");
?>
          <?php 
text_field("model", "รุ่น", null, 0);
?>
          <?php 
text_field("buy_price", "ราคาซื้อ", null, 1);
?>
          <?php 
text_field("warranty", "การรับประกัน", null, 1, "width800");
?>
         
         	<?php 
$rows = $this->db->query("select budget_id, concat(budget_name,'-', year) as budget_name from budgets")->result_array();
select_field("budget_id", "ชนิดงบประมาณ", $rows, "budget_name", null, 0);
?>
Example #13
0
        <h1>ชนิดงบประมาณ</h1>
		  <?php 
form_head("admin/budget_edit/" . $row["budget_id"], "เพิ่มชนิดงบประมาณใหม่");
?>
          <?php 
text_field("budget_name", "ชื่อ", $row, 1);
?>
          <?php 
text_field("year", "ปีการศึกษา", $row, 1);
?>
         
          <?php 
form_footer();
?>
          
Example #14
0
<h1>ผู้ใช้งาน</h1>
		 <?php 
form_head("admin/user_add/", "เพิ่มผุ้ใช้งานใหม่");
?>
		 
<table class="list" style="width:400px;" >
  <tbody>
           
		 
          <?php 
text_field("username", "ชื่อผู้ใช้งาน", null, 1, "even");
?>
          <?php 
text_field("password", "รหัสผ่าน", null, 1);
?>
          <?php 
text_field("firstname", "ชื่อจริง", null, 0, "even");
?>
          <?php 
text_field("lastname", "นามสกุล", null, 1);
?>
          <?php 
text_field("email", "อีเมล์", null, 1, "even");
?>
           <?php 
text_field("tel", "เบอร์โทร", null, 1);
?>
          <?php 
text_field("position", "ตำแหน่ง", null, 1, "even");
?>
		<?php 
Example #15
0
      <h1>รายงานวัสดุครุภัณฑ์</h1>


<?php 
$filter = $this->session->userdata("report_filter");
if (!$filter) {
    $filter = null;
}
?>
  <?php 
form_head("report/report_filter", "กรองข้อมูล");
?>
          
         
         	<?php 
$rows = $this->db->query("select *  from material_types")->result_array();
select_field("type_id", "ชนิด", $rows, "type_name", $filter, 0, "ทั้งหมด");
?>
		 
		 	      	<?php 
$rows = $this->db->get("material_categories")->result_array();
select_field("category_id", "หมวด", $rows, "category_name", $filter, 0, "ทั้งหมด");
?>
		
		 
         	<?php 
$rows = $this->db->query("select budget_id, concat(budget_name,'-', year) as budget_name from budgets")->result_array();
select_field("budget_id", "งบประมาณ", $rows, "budget_name", $filter, 0, "ทั้งหมด");
?>
		 
       
Example #16
0
 <h1>ชนิดงานซ่อม</h1>

		  <?php 
form_head("admin/maintain_delete/" . $row["maintain_id"], "ลบ");
?>
	
	<?php 
echo $row["maintain_name"];
?>
          <input type="hidden"" name="maintain_id" value="<?php 
echo $row["maintain_id"];
?>
" />
         
          <?php 
form_footer("ยืนยันการลบข้อมูล");
?>
          
		
         
		


   
Example #17
0
      <h1>วัสดุ</h1>



  <?php 
form_head("admin/material_edit2/" . $row["material_id"], "แก้ไขวัสดุใหม่");
?>
          <?php 
text_field("name", "ชื่อวัสดุ", $row, 0);
?>
          
          <?php 
text_field("brand", "ยี้ห้อ", $row, 1);
?>
          <?php 
text_field("buy_date", "วันที่ซื้อ", $row, 0, "date");
?>
          <?php 
text_field("model", "รุ่น", $row, 0);
?>
          <?php 
text_field("buy_price", "ราคาซื้อ", $row, 1);
?>
          <?php 
text_field("warranty", "การรับประกัน", $row, 1, "width800");
?>
         
         	<?php 
$rows = $this->db->query("select budget_id, concat(budget_name,'-', year) as budget_name from budgets")->result_array();
select_field("budget_id", "ชนิดงบประมาณ", $rows, "budget_name", $row, 0);
?>
Example #18
0
		  <?php 
form_head("admin/budget_delete/" . $row["budget_id"], "ลบชนิดงบประมาณใหม่");
?>
          <?php 
text_field("budget_name", "ชื่อ", $row, 1);
?>
         
         
       
          
          <?php 
form_footer("ยืนยันการลบข้อมูล");
?>
          
		
         
		


   
Example #19
0
 <h1>ชนิดงานซ่อม</h1>

		  <?php 
form_head("admin/maintain_edit/" . $row["maintain_id"], "เพิ่มชนิดงานซ่อมใหม่");
?>
		        	<?php 
$rows = $this->db->get("material_categories")->result_array();
select_field("category_id", "หมวด", $rows, "category_name", $row["category_id"], 1);
?>
          <?php 
text_field("maintain_name", "ชื่องานซ่อมใหม่", $row, 1);
?>
           <?php 
area_field("remark", "หมายเหตุ", $row, 1);
?>
         
          <?php 
form_footer();
?>
          
		
         
		


   
Example #20
0
  <h1>บันทึกงานซ่อมใหม่</h1>

   
    

		  <?php 
form_head("admin/m_maintain_add/" . $row["material_id"], "บันทึกรายละเอียดงานซ่อมใหม่ ของ รหัสอ้างอิง " . $row["ref_code"] . " " . $row["name"]);
?>
         <?php 
$mtypes = $this->db->query("select * from maintain where category_id  =  " . $row["category_id"])->result_array();
select_field("maintain_id", "ชนิดงานซ่อม", $mtypes, "maintain_name", null);
?>
          <?php 
text_field("maintain_date", "วันทีซ่อม", null, 1, "date");
?>
             	<?php 
$rows = $this->db->query("select company_id,concat(company_name,':',address)as company_name from company")->result_array();
select_field("company_id", "บริษัทที่ซ่อมแซม", $rows, "company_name", null, 0);
?>
		 <?php 
text_field("price", "ราคาซ่อม", null, 1);
?>
		  <?php 
text_field("responsible", "เจ้าหน้าที่รับผิดชอบ", null, 1);
?>
          <?php 
area_field("remark", "รายละเอียดงานซ่อม", null);
?>
          
         
          <?php 
Example #21
0
        <h1>บริษัท</h1>

		  <?php 
form_head("admin/company_add", "เพิ่มบริษัทใหม่");
?>
          <?php 
text_field("company_name", "ชื่อบริษัท", null, 1);
?>
          <?php 
text_field("tel", "เบอร์โทร", null, 1);
?>
          <?php 
text_field("fax", "เบอร์FAx", null, 1);
?>
          <?php 
text_field("email", "อีเมล์", null, 1);
?>
          <?php 
area_field("address", "ที่อยู่", null, 1);
?>
          <?php 
form_footer();
?>
          
		
         
		


   
Example #22
0
        <h1>ห้องหรือสถานที่</h1>

   
    

		  <?php 
form_head("admin/room_add/", "เพิ่มห้องหรือสถานที่ใหม่");
?>
          <?php 
text_field("place_name", "ชื่อห้อง/สถานที่", null, 1);
?>
         
         
          <?php 
form_footer();
?>
          
Example #23
0
<h1>ค้นหาวัสดุ/ครุภัณ</h1>

   
    

  <?php 
form_head("admin/search/", "ค้นหาจาก เลขที่อ้างอิง หรือ เลขที่ครุถัณฑ์");
?>
  <?php 
text_field("ref_code", "เลขที่อ้างอิง/เลขที่ครุถัณฑ์", null, 1);
?>

         
  <?php 
form_footer("ค้นหา");
?>