<form id="form1" name="form1" method="post" action="index.php"> <input type="hidden" name="page" value="accountEdit" /> <?php $account = load_class("Account"); $ID = $_REQUEST['ID']; $action = $_REQUEST['action']; $d = $_REQUEST; if ($action == 'ADD') { $account->add($d); backToPage("accountList"); } elseif ($action == 'EDIT') { $account->update($d); if (!$d['error']) { echo "<font color='#0000FF'>{$_DATA_UPDATED}</font><hr>"; } } if ($d['error']) { echo "<font color='#FF0000'>" . $d['error'] . "</font><hr>"; } if ($ID) { $db = $account->sql("ID = '{$ID}'"); $db->next_record(); $_username = $db->f("username"); $authAdmChk = $db->f("authority") == 'ADMIN' ? "CHECKED" : ""; $authUserChk = $db->f("authority") == 'USER' ? "CHECKED" : ""; $_name = $db->f("name"); $genderM = $db->f("gender") == 'M' ? "CHECKED" : ""; $genderF = $db->f("gender") == 'F' ? "CHECKED" : ""; $birthday = $db->f("birthday"); $email = $db->f("email"); $phone = $db->f("phone");
<form id="form1" name="form1" method="post" action="index.php"> <input type="hidden" name="page" value="messagesEdit" /> <?php $messages = load_class("Messages"); $messageGroup = load_class("MessageGroup"); $groups = load_class("Groups"); $ID = $_REQUEST['ID']; $action = $_REQUEST['action']; $d = $_REQUEST; if ($action == 'ADD') { $messages->add($d); backToPage("messagesList"); } elseif ($action == 'EDIT') { $messages->update($d); if (!$d['error']) { echo "<font color='#0000FF'>{$_DATA_UPDATED}</font><hr>"; } } if ($d['error']) { echo "<font color='#FF0000'>" . $d['error'] . "</font><hr>"; } if ($ID) { $db = $messages->sql("ID = '{$ID}'"); $db->next_record(); $_message = $db->f("message"); $grouped0Chk = $db->f("grouped") == '0' ? "CHECKED" : ""; $grouped1Chk = $db->f("grouped") == '1' ? "CHECKED" : ""; $published = $db->f('published') > 0 ? date("Y-m-d", strtotime($db->f('published'))) : ""; $closed = $db->f('closed') > 0 ? date("Y-m-d", strtotime($db->f('closed'))) : ""; $groupIDs = $messageGroup->get_groups($ID); $action = $_UPDATE;
<form id="form1" name="form1" method="post" action="index.php"> <input type="hidden" name="page" value="categoryEdit" /> <?php $account = load_class("Account"); $item = load_class("Item"); $category = load_class("Category"); $ID = $_REQUEST['ID']; $action = $_REQUEST['action']; $d = $_REQUEST; $lang = $_SESSION['lang']; $name_fld = 'name_' . $lang; $fname = 'catename_' . $lang; if ($action == 'ADD') { $category->add($d); backToPage("categoryList"); } elseif ($action == 'EDIT') { $category->update($d); if (!$d['error']) { echo "<font color='#0000FF'>{$_DATA_UPDATED}</font><hr>"; } } if ($d['error']) { echo "<font color='#FF0000'>" . $d['error'] . "</font><hr>"; } if ($ID) { $db = $category->sql("A.ID = '{$ID}'"); $db->next_record(); $item_select = $item->select("itemID", $db->f("itemID")); $user_select = $account->select("accountID", $db->f("accountID")); ${$fname} = $db->f($name_fld); $typeSysChk = $db->f("type_Def") == 'SYSTEM' ? "CHECKED" : "";
<form id="form1" name="form1" method="post" action="index.php"> <input type="hidden" name="page" value="deviceEdit" /> <?php $device = load_class("Device"); $ID = $_REQUEST['ID']; $action = $_REQUEST['action']; $d = $_REQUEST; $lang = $_SESSION['lang']; $name_fld = 'name_' . $lang; if ($action == 'ADD') { $device->add($d); backToPage("deviceList"); } elseif ($action == 'EDIT') { $device->update($d); if (!$d['error']) { echo "<font color='#0000FF'>{$_DATA_UPDATED}</font><hr>"; } } if ($d['error']) { echo "<font color='#FF0000'>" . $d['error'] . "</font><hr>"; } if ($ID) { $db = $device->sql("ID = '{$ID}'"); $db->next_record(); $_name = $db->f($name_fld); $model = $db->f("model"); $information = $db->f("information"); $users_list = $device->device_users($ID); $action = $_UPDATE; echo "<input type='hidden' name='action' value='EDIT'>"; echo "<input type='hidden' name='ID' value='{$ID}'>";
<form id="form1" name="form1" method="post" action="index.php"> <input type="hidden" name="page" value="itemEdit" /> <?php $item = load_class("Item"); $device = load_class("Device"); $ID = $_REQUEST['ID']; $action = $_REQUEST['action']; $d = $_REQUEST; $lang = $_SESSION['lang']; $name_fld = 'name_' . $lang; if ($action == 'ADD') { $item->add($d); backToPage("itemList"); } elseif ($action == 'EDIT') { $item->update($d); if (!$d['error']) { echo "<font color='#0000FF'>{$_DATA_UPDATED}</font><hr>"; } } if ($d['error']) { echo "<font color='#FF0000'>" . $d['error'] . "</font><hr>"; } if ($ID) { $db = $item->sqlAll("ID = '{$ID}'"); $db->next_record(); $_name = $db->f($name_fld); $device_select = $device->select("deviceID", $db->f("deviceID")); $modeListChk = $db->f("articleMode") == 'LIST' ? "CHECKED" : ""; $modeSelectChk = $db->f("articleMode") == 'SELECT' ? "CHECKED" : ""; $YesChk = $db->f("userArticle") == 'YES' ? "CHECKED" : ""; $NoChk = $db->f("userArticle") == 'NO' ? "CHECKED" : "";
<form id="form1" name="form1" method="post" action="index.php"> <input type="hidden" name="page" value="groupsEdit" /> <?php $groups = load_class("Groups"); $accountGroup = load_class("AccountGroup"); $account = load_class("Account"); $ID = $_REQUEST['ID']; $action = $_REQUEST['action']; $d = $_REQUEST; if ($action == 'ADD') { $groups->add($d); backToPage("groupsList"); } elseif ($action == 'EDIT') { $groups->update($d); if (!$d['error']) { echo "<font color='#0000FF'>{$_DATA_UPDATED}</font><hr>"; } } if ($d['error']) { echo "<font color='#FF0000'>" . $d['error'] . "</font><hr>"; } if ($ID) { $db = $groups->sql("ID = '{$ID}'"); $db->next_record(); $_groupname = $db->f("groupname"); $_parentID = $db->f("parentID"); $accountIDs = $accountGroup->get_accounts($ID); $action = $_UPDATE; echo "<input type='hidden' name='action' value='EDIT'>"; echo "<input type='hidden' name='ID' value='{$ID}'>"; } else {
<form id="form1" name="form1" method="post" action="index.php"> <input type="hidden" name="page" value="itemArticleEdit" /> <?php $account = load_class("Account"); $item = load_class("Item"); $itemArticle = load_class("ItemArticle"); $ID = $_REQUEST['ID']; $action = $_REQUEST['action']; $d = $_REQUEST; $lang = $_SESSION['lang']; $name_fld = 'name_' . $lang; $measure_fld = 'measurement_' . $lang; if ($action == 'ADD') { $itemArticle->add($d); backToPage("itemArticleList"); } elseif ($action == 'EDIT') { $itemArticle->update($d); if (!$d['error']) { echo "<font color='#0000FF'>{$_DATA_UPDATED}</font><hr>"; } } if ($d['error']) { echo "<font color='#FF0000'>" . $d['error'] . "</font><hr>"; } if ($ID) { $db = $itemArticle->sql("A.ID = '{$ID}'"); $db->next_record(); $item_select = $item->select("itemID", $db->f("itemID")); $user_select = $account->select("accountID", $db->f("accountID")); $artname = $db->f($name_fld); $measurement = $db->f($measure_fld);
<?php echo $_HEALTH_LOG; ?> <?php if ($itemName) { echo ": {$itemName}"; } ?> <form id="form1" name="form1" method="post" action="index.php"> <input type="hidden" name="page" value="logEdit" /> <?php if ($action == 'ADD') { //print_r($d); $itemEntry->add($d); backToPage("logList&itemID={$itemID}"); } elseif ($action == 'EDIT') { $itemEntry->update($d); if (!$d['error']) { echo "<font color='#0000FF'>{$_DATA_UPDATED}</font><hr>"; } } if ($d['error']) { echo "<font color='#FF0000'>" . $d['error'] . "</font><hr>"; } if ($ID) { $db = $itemEntry->sql("ID = '{$ID}'"); $db->next_record(); $c_datetime = $db->f("createdTime"); $c_date = date("Y-m-d", strtotime($c_datetime)); $c_time = date("H:i", strtotime($c_datetime));