Example #1
0
 public function addRules($rules)
 {
     exit('FIX ME');
     $tuples = array();
     $arg = array();
     $const = sqlConsts();
     $table = tableList();
     if (!is_array($rules)) {
         $rules = array($rules);
     }
     if (!empty($rules)) {
         foreach ($rules as $rule) {
             $tuples[] = '(' . $const[SQL_DBMS]['default'] . ', ?)';
             $arg[] = $rule;
         }
         $sql = 'INSERT INTO ' . SQL_PREFIX . 'auth_rules
           (id, name)
           VALUES ' . implode(',' . $tuples) . ';';
         $this->execPrepStat($sql, $arg, Misc::whoCalledMe());
         $this->reloadRules();
     }
 }
Example #2
0
					<input id="idImageDoc" name="idImageDoc" type="hidden" value="0">
				</form>
				</td>
			</tr>
			<tr>
				<td style="vertical-align: top; height: 1%;">
				<table id="tFields" class="jss-Table" style="width: 100%; height: 1%;">
					<tr>
						<td class="jss-Bar">&nbsp;Tables</td>
					</tr>
					<tr>
						<td>
						<select class="jss-FieldAuto" name="qTables" onchange="javascript: putFields(this.options[this.selectedIndex].text);" size="1">
						<option selected="" value="-">-</option>
						<?php 
echo tableList('all', '');
?>
						</select></td>
					</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td id="listFields" style="overflow: auto; vertical-align: top;">
				</td>
			</tr>
		</table>
		</td>
	</tr>
	</table>
</body>
<?php

require_once 'startup.php';
//require_once('security.php');
include 'header.php';
$mode = 'LIST';
if (!empty($_GET['mode'])) {
    $mode = strtoupper($_GET['mode']);
}
switch ($mode) {
    case 'LIST':
        // list records in table
        echo tableList(array('personnel', 'departments'), array('personnel.id', 'departments.name', 'personnel.firstname', 'personnel.lastname', 'personnel.permission'), array('ID', 'Department', 'First Name', 'Last Name', 'Permissions'), 'WHERE departments.id = dept_id ORDER BY lastname ASC');
        break;
    default:
        echo '<p>Invalid display mode.</p>';
        break;
}
// switch mode
include 'footer.php';
// DB에 저장되어있는 표 색깔을 읽어온다.
$fpTableColor = fopen("/usr/local/apache/htdocs/project_os/DB/homepage/tableColor", "r");
$TableColorResult = fread($fpTableColor, 255);
// 아날로그 설정
$analogLocation = "/usr/local/apache/htdocs/project_os/DB/gpio_analog/";
// 변수(표)가 출력되는 php를 가져온다.
require './functionList.php';
echo "<p align = center>";
echo "<form action=modify_ok.php?no={$no} method=post> ";
// 메뉴 표 시작
echo "<table width = 330 height = 40 align = center><tr bgcolor= {$TableColorResult}>";
echo "<td><p align = center><a href = 'setting.php'  width = 10>\t<font color = white size = 2>Setting<br></a></font></p></td>";
echo "<td><p align = center><a href = 'new.php'  width = 10>\t\t<font color = white size = 2>New<br></a></font></p></td></tr><tr  bgcolor= {$TableColorResult}>";
echo "<td><p align = center><a href = 'new_numorus.php'>\t\t\t<font color = white size = 2>GroupControl<br></a></p></font></td>";
echo "<td><p align = center><a href = 'sourceSelect.html'><font color = white size = 2>Source Code Modify<br></a></p></font></td></tr></table>";
tableList(330);
// GPIO 표 시작
echo "<table width = 330  border = 1 cellpadding='3' cellspacing='1' frame = 'void' align = center><tr bgcolor={$TableColorResult} >";
echo "<td align = center >\t<font color = white size = 2><b>#</b></font></td>";
echo "<td align = center>\t<font color = white size = 2><b>PinData</b></font></td>";
echo "<td align = center>\t<font color = white size = 2><b>Control</b></font></td></tr><tr>";
echo "<br>";
// while문 0번 부터 13번 까지 돈다 (추가해야됨 : 아날로그)
while ($i < 20) {
    // GPIO 설정 값을 읽어온다.
    $fp_config = "/usr/local/apache/htdocs/project_os/DB/gpio_config_DB/";
    $fp_config .= $i;
    // GPIO 설정 텍스트 파일 fopen
    $config_open = fopen($fp_config, "r+");
    $config_index = fread($config_open, 1);
    // 설정 값이 0이면 사용하지 않는 상태 : 출력되지 않음
$fpTableColor = fopen("/usr/local/apache/htdocs/project_os/DB/homepage/tableColor", "r");
$TableColorResult = fread($fpTableColor, 255);
// 아날로그 설정
$analogLocation = "/usr/local/apache/htdocs/project_os/DB/gpio_analog/";
// 변수(표)가 출력되는 php를 가져온다.
require './functionList.php';
echo "<p align = center>";
echo "<form action=modify_ok.php?no={$no} method=post> ";
// 메뉴 표 시작
echo "<table width = 800 height = 40 align = center><tr bgcolor= {$TableColorResult}>";
echo "<td><p align = center><a href = 'setting.php'  width = 10>\t<font color = white size = 2>Setting<br></a></font></p></td>";
echo "<td><p align = center><a href = 'new.php'  width = 10>\t\t<font color = white size = 2>New<br></a></font></p></td>";
echo "<td><p align = center><a href = 'new_numorus.php'>\t\t\t<font color = white size = 2>GroupControl<br></a></p></font></td>";
echo "<td><p align = center><a href = 'new_timer.php'>\t\t\t<font color = white size = 2>Timer<br></a></p></font></td>";
echo "<td><p align = center><a href = 'sourceSelect.html'><font color = white size = 2>Source Code Modify<br></a></p></font></td></tr></table>";
tableList(800);
// GPIO 표 시작
echo "<table width = 800  border = 1 cellpadding='3' cellspacing='1' frame = 'void' align = center><tr bgcolor={$TableColorResult} >";
echo "<td align = center >\t<font color = white size = 2><b>#</b></font></td>";
echo "<td align = center>\t<font color = white size = 2><b>PinData</b></font></td>";
echo "<td align = center>\t<font color = white size = 2><b>Control</b></font></td></tr><tr>";
echo "<br>";
// while문 0번 부터 13번 까지 돈다 (추가해야됨 : 아날로그)
while ($i < 20) {
    // GPIO 설정 값을 읽어온다.
    $fp_config = "/usr/local/apache/htdocs/project_os/DB/gpio_config_DB/";
    $fp_config .= $i;
    // GPIO 설정 텍스트 파일 fopen
    $config_open = fopen($fp_config, "r+");
    $config_index = fread($config_open, 1);
    // 설정 값이 0이면 사용하지 않는 상태 : 출력되지 않음
Example #6
0
						<table class="jss-Menu" style="width: 100%">
							<tr class="jss-Bar">
								<td class="jss-Up">&nbsp;</td>
								<td class="jss-Bar"><?php 
echo _QUERYS;
?>
</td>
							</tr>
							<tr>
								<td>
								<img alt="" height="16" src="../images/report16.gif">
								</td>
								<td>
								<select class="CampoTexto" name="lista" onchange="javascript: showReport(this);" size="1" style="width: 99%">
								<?php 
echo tableList('view', 'q');
?>
								<option selected="" value="-">-</option>
								</select></td>
							</tr>
						</table>
						</td>
					</tr>
					<tr>
						<td colspan="2">
						<table class="jss-Menu" style="width: 100%">
							<tr class="jss-Bar">
								<td class="jss-Up"></td>
								<td><?php 
echo _SYSTEM . ' ' . _INFO;
?>