示例#1
0
 function __construct()
 {
     if (login_data('nursery') == "") {
         redirect('home');
     }
     parent::__construct();
 }
示例#2
0
					<input type="submit" value="โหวต" /></div>
		</form>
    </div><!--data-->
<div style="padding:0 10px 10px;">
	<div id="commentform">
	<h3>ร่วมแสดงความคิดเห็น</h3>
	<form action="informations/comment/<?php 
echo $information->id;
?>
" method="POST">
		<table>
			<?php 
if ($this->session->userdata('id')) {
    ?>
			<tr><th style="width:150px;">name : </th><td><?php 
    echo login_data('display');
    ?>
</td></tr>
			<?php 
} else {
    ?>
			<tr><th style="width:150px;">name : </th><td><input type="text" name="name" class="textbox" value=""></td></tr>
			<?php 
}
?>
			<tr><th></th><td><img src="users/captcha" /></td></tr>
			<tr><th>Captcha : </th><td><input type="text" name="captcha" class="textbox"> </td></tr>
			<tr><th>Comment : </th><td><textarea name="comment" class="editor[mini]"></textarea></td></tr>
			<tr><th></th><td><input type="submit" value="ตกลง" /></td></tr>
		</table>
    </form>
示例#3
0
                }
            }
            $sql = "update signup set logintime='" . time() . "' WHERE username='******'username']}'";
            $conn->execute($sql);
            $myUID = $UID;
            SESSION_REGISTER("myUID");
            $_SESSION[myUID] = $rs->fields['UID'];
            SESSION_REGISTER("UID");
            $_SESSION[UID] = $rs->fields['UID'];
            SESSION_REGISTER("EMAIL");
            $_SESSION[EMAIL] = $rs->fields[email];
            SESSION_REGISTER("USERNAME");
            $_SESSION[USERNAME] = $rs->fields['username'];
            SESSION_REGISTER("EMAILVERIFIED");
            $_SESSION[EMAILVERIFIED] = $rs->fields[emailverified];
            login_data("last_5users");
            if ($_REQUEST['next'] != "") {
                $page = $_REQUEST['next'] . ".php";
            } else {
                $page = "index.php";
            }
            if ($_REQUEST['add'] != "") {
                $add = base64_decode($_REQUEST['add']);
            }
            header("Location:{$config['baseurl']}/{$page}?{$add}");
            exit;
        }
    }
}
STemplate::assign('err', $err);
STemplate::assign('msg', $msg);
示例#4
0
    }
    // Twitter @ filter
    $last_status_twitter = str_replace(TWITTER_USERNAME . ': ', '', $status->title);
    break;
}
$status = $last_status_twitter;
# Read last updated status from vtweet.txt
$f = fopen(dirname(__FILE__) . '/vtweet.txt', 'r');
$last_status_gplus = fread($f, 512);
fclose($f);
@unlink($cookies);
//delete previous cookie file if exists
touch($cookies);
//create a cookie file
if ($last_status_gplus != $last_status_twitter && $last_status_twitter != NULL) {
    login(login_data());
    sleep($sleeptime);
    if ($pageid) {
        update_page_status();
    } else {
        update_profile_status();
    }
    //update status with $GLOBAL['status'];
    sleep($sleeptime);
    logout();
    //optional - log out
    $f = fopen(dirname(__FILE__) . '/vtweet.txt', 'w');
    fwrite($f, $last_status_twitter);
    // Mark status as updated in file
    fclose($f);
    echo 'Updated.\\n';
示例#5
0
echo form_dropdown('amphur_id', get_option('id', 'amphur_name', 'amphures', 'where province_id in (select id from provinces where nursery = ' . $user->nursery . ') order by amphur_name asc'), $_GET['amphur_id'], '', '--- เลือกอำเภอ ---');
?>
</span>
	    	  <span id="district"><?php 
echo form_dropdown('district_id', get_option('id', 'district_name', 'districts', 'where province_id in (select id from provinces where nursery = ' . $user->nursery . ') order by district_name asc'), $_GET['district_id'], '', '--- เลือกตำบล ---');
?>
</span>
	    	  <?php 
echo form_dropdown('year', array('2554' => '2554', '2555' => '2555'), $_GET['year'], '', '--- เลือกปี ---');
?>
	  	      <input type="submit" value=" ค้นหา ">
	    	</div>
    	</form>
        
        <?php 
if (login_data('nursery') == 0) {
    ?>
        <div style="float:right; padding:10px 0;">
        	<a href="nurseries/category_form" class="btn">คำนำหน้า</a>
        	<a href="nurseries/report2" target="_blank" class="btn">รายงาน</a>
        </div>
        <?php 
}
?>
        <div style="float:right; padding:10px 0;"><a href="nurseries/register_form" class="btn">เพิ่มศูนย์เด็กเล็ก</a></div>
    	<table class="tbchild">
        <tr>
        <th>ลำดับ</th>
        <th>ชื่อศุนย์พัฒนาเด็กเล็ก</th>
        <th>แบบฟอร์ม</th>
        <th>ปีที่เข้าร่วม</th>
        			<td>
        				<?php 
if (login_data('nursery') == 0) {
    ?>
				        	<?php 
    echo form_dropdown('area_id', array('1' => 'สคร.1', '2' => 'สคร.2', '3' => 'สคร.3', '4' => 'สคร.4', '5' => 'สคร.5', '6' => 'สคร.6', '7' => 'สคร.7', '8' => 'สคร.8', '9' => 'สคร.9', '10' => 'สคร.10', '11' => 'สคร.11', '12' => 'สคร.12'), $nursery->area_id, '', '--- เลือก ---');
    ?>
				        <?php 
} else {
    ?>
				        	<input type="text" value="<?php 
    echo login_data('nursery');
    ?>
" disabled>
				        	<input type="hidden" name="area_id" value="<?php 
    echo login_data('nursery');
    ?>
">
				        <?php 
}
?>
        			</td>
        		</tr>
				<tr>
                   <th>ปีที่เข้าร่วมโครงการ<strong> <span class="TxtRed">*</span></strong></th>
                   <td><?php 
echo form_dropdown('year', array('2554' => '2554', '2555' => '2555'), $nursery->year);
?>
</td>
                 </tr>
                 <tr>