コード例 #1
0
ファイル: laptop_add_edit.php プロジェクト: Rhenan/intranet-1
</td>
					<td><?php 
    echo $a["name"];
    ?>
</td>
				</tr>
				<?php 
}
?>
			</table>
		</td>
	</tr>
	<tr>
		<td class="left">Notes</td>
		<td><?php 
echo draw_form_textarea("laptopPurpose", @$r["laptopPurpose"]);
?>
</td>
	</tr>
	<tr>
		<td class="bottom" colspan="2">
			<?php 
if (isset($_GET["id"])) {
    echo draw_form_submit("save changes");
} else {
    echo draw_form_submit("add laptop");
}
?>
		</td>
	</tr>
	</form>
コード例 #2
0
ファイル: include.php プロジェクト: Rhenan/intranet-1
function drawThreadCommentForm($showAdmin = false)
{
    global $page, $_josh, $_SESSION;
    $name = $_josh['request']['folder'] == 'bb' ? 'description' : 'message';
    $return = '<a name="bottom"></a><form ';
    if ($_josh['db']['language'] == 'mysql') {
        $return .= 'accept-charset="utf-8" ';
    }
    $return .= 'method="post" action="' . $_josh['request']['path_query'] . '" onsubmit="javascript:return validate(this);"><tr valign="top">
			<td class="left">' . drawName($_SESSION['user_id'], $_SESSION['full_name'], false, true, false) . '</td>
			<td>' . draw_form_textarea($name . langExt(), '', 'mceEditor thread');
    if ($showAdmin && $page['is_admin']) {
        $return .= '
			<table class="nospacing">
				<tr>
					<td width="16">' . draw_form_checkbox('is_admin') . '</td>
					<td>' . drawCheckboxText('is_admin', 'This followup is admin-only (invisible to most users)') . '</td>
				</tr>
			</table>';
    }
    $return .= '
			</td>
		</tr>
		<tr>
			<td class="bottom" colspan="2">' . draw_form_submit(getString('add_followup')) . '</td>
		</tr>
		</form>';
    return $return;
}
コード例 #3
0
ファイル: status.php プロジェクト: Rhenan/intranet-1
    url_change('./');
}
echo drawTop();
echo lib_get('tinymce');
echo draw_javascript_src('/_intranet.seedco.site/lib/tinymce/tinymce_3_3_8/tiny_mce.js');
echo draw_javascript('form_tinymce_init("/css/tinymce-helpdesk-status.css", true);');
?>
<table class="left" cellspacing="1">
	<form action="<?php 
echo $request["path_query"];
?>
" method="post">
	<?php 
echo drawHeaderRow("Update Status Message");
?>
	<tr>
		<td><?php 
echo draw_form_textarea("helpdesk_status", $helpdeskStatus, "tinymce", false);
?>
</td>
	</tr>
	<tr>
		<td class="bottom"><?php 
echo draw_form_submit("update message");
?>
</td>
	</tr>
	</form>
</table>
<?php 
echo drawBottom();
コード例 #4
0
ファイル: contact_edit.php プロジェクト: Rhenan/intranet-1
		<td><?php 
echo draw_form_text("varchar_10", @$i["cell"], false, 14, "width:120px;");
?>
</td>
	</tr>
	<tr>
		<td class="left">E-mail Address</td>
		<td><?php 
echo draw_form_text("varchar_11", @$i["email"], false, 255, "width:250px;");
?>
</td>
	</tr>
	<tr valign="top">
		<td class="left">Notes</td>
		<td><?php 
echo draw_form_textarea("text_01", @$i["notes"]);
?>
</td>
	</tr>
	<tr class="group">
		<td colspan="2"><br>Tags</td>
	</tr>
	<?php 
$tags = db_query("select \r\n\t\t\t\t\tf.tagTypeID,\r\n\t\t\t\t\tf.name,\r\n\t\t\t\t\tf.fieldTypeID,\r\n\t\t\t\t\tf.isRequired\r\n\t\t\t\tfrom contacts_fields f\r\n\t\t\t\tjoin contacts_tags_types t on f.tagTypeID = t.id\r\n\t\t\t\twhere f.objectTypeID = 22 and t.is_active = 1 \r\n\t\t\t\torder by f.precedence");
while ($t = db_fetch($tags)) {
    ?>
	<tr valign="top">
		<td bgcolor="#<?php 
    if ($t["isRequired"]) {
        ?>
FFDDDD<?php 
コード例 #5
0
ファイル: index.php プロジェクト: joshreisner/hcfa-cc
 function addRow($field)
 {
     global $_josh;
     extract($field);
     $return = "";
     if ($type == "hidden") {
         $return .= draw_form_hidden($name, $value);
     } else {
         if ($label) {
             $return .= '<dt class="' . $type . '">' . $label;
             if ($additional && $type == "checkboxes") {
                 $return .= $additional;
             }
             $return .= '</dt>' . $_josh["newline"];
         }
         $return .= '<dd class="' . $type . '">';
         if ($type == "checkbox") {
             $return .= '<div class="checkbox_option">' . draw_form_checkbox($name, $value) . '<span class="option_name" onclick="javascript:form_checkbox_toggle(\'' . $name . '\');">' . $additional . '</span></div>';
         } elseif ($type == "checkboxes") {
             if ($value) {
                 $options = db_query("SELECT o.id, o.name, (SELECT COUNT(*) FROM {$linking_table} l WHERE l.option_id = o.id AND l.object_id = {$value}) checked FROM {$options_table} o ORDER BY o.name");
             } else {
                 $options = db_query("SELECT id, name, 0 checked FROM {$options_table} ORDER BY name");
             }
             while ($o = db_fetch($options)) {
                 $name = "chk_" . str_replace("_", "-", $options_table) . "_" . $o["id"];
                 $return .= '<div class="checkbox_option">' . draw_form_checkbox($name, $o["checked"]) . '<span class="option_name" onclick="javascript:form_checkbox_toggle(\'' . $name . '\');">' . $o["name"] . '</span></div>';
             }
         } elseif ($type == "date") {
             $return .= draw_form_date($name, $value, false) . $additional;
         } elseif ($type == "datetime") {
             $return .= draw_form_date($name, $value, true) . $additional;
         } elseif ($type == "note") {
             $return .= "<div class='note'>" . $additional . "</div>";
         } elseif ($type == "password") {
             $return .= draw_form_password($name, $value, $class, 255, false) . $additional;
         } elseif ($type == "radio") {
             if (!$options) {
                 if (!$sql) {
                     $sql = "SELECT id, name FROM options_" . str_replace("_id", "", $name);
                 }
                 $options = db_array($sql);
             }
             if ($append) {
                 while (list($addkey, $addval) = each($append)) {
                     $options[$addkey] = $addval;
                 }
             }
             foreach ($options as $id => $description) {
                 $return .= '<div class="radio_option">' . draw_form_radio($name, $id, $value == $id, $class) . $description . '</div>';
             }
         } elseif ($type == "select") {
             if (!$options) {
                 if (!$sql) {
                     $sql = "SELECT id, name FROM options_" . str_replace("_id", "", $name);
                 }
                 $options = db_array($sql);
             }
             if ($append) {
                 while (list($addkey, $addval) = each($append)) {
                     $options[$addkey] = $addval;
                 }
             }
             $return .= draw_form_select($name, $options, $value, $required, $class, $action);
         } elseif ($type == "submit") {
             $return .= draw_form_submit($value, $class) . $additional;
         } elseif ($type == "text") {
             $return .= draw_form_text($name, $value, $class, $maxlength, false, false) . $additional;
         } elseif ($type == "textarea") {
             $return .= draw_form_textarea($name, $value, $class) . $additional;
         }
         $return .= '</dd>' . $_josh["newline"];
     }
     return $return;
 }
コード例 #6
0
ファイル: include.php プロジェクト: joshreisner/hcfa-cc
 function addRow($type, $title, $name = "", $value = "", $default = "", $required = false, $maxlength = 50, $onchange = false)
 {
     global $rows, $js, $months, $month, $today, $year, $_josh;
     $textlength = $maxlength > 50 ? 50 : $maxlength;
     $value = trim($value);
     if ($type == "raw") {
         $rows .= $title;
     } else {
         $rows .= '<tr>';
         if ($type != "button" && $type != "submit" && $type != "hidden" && $type != "raw") {
             $rows .= '<td class="left">' . $title . '</td>';
         }
         if ($type == "text") {
             //output text, no form element
             $rows .= '<td>' . $value . '</td>';
         } elseif ($type == "date") {
             $rows .= '<td>' . draw_form_date($name, $value, false, false, $required) . '</td>';
         } elseif ($type == "datetime") {
             $rows .= '<td>' . draw_form_date($name, $value, true) . '</td>';
         } elseif ($type == "checkbox") {
             $rows .= '<td>' . draw_form_checkbox($name, $value) . '</td>';
         } elseif ($type == "itext") {
             $rows .= '<td>' . draw_form_text($name, $value, false, $maxlength) . '</td>';
             if ($required) {
                 $js .= "if (!form." . $name . ".value.length) errors[errors.length] = 'the \\'" . $title . "\\' field is empty';" . $_josh["newline"];
             }
         } elseif ($type == "phone") {
             $rows .= '<td>' . draw_form_text($name, $value, 14, $maxlength) . '</td>';
             if ($required) {
                 $js .= "if (!form." . $name . ".value.length) errors[errors.length] = 'the \\'" . $title . "\\' field is empty';" . $_josh["newline"];
             }
         } elseif ($type == "extension") {
             $rows .= '<td>' . draw_form_text($name, $value, 4, $maxlength) . '</td>';
             if ($required) {
                 $js .= "if (!form." . $name . ".value.length) errors[errors.length] = 'the \\'" . $title . "\\' field is empty';" . $_josh["newline"];
             }
         } elseif ($type == "password") {
             $rows .= '<td>' . draw_form_password($name, $value, $textlength, $maxlength) . '</td>';
             if ($required) {
                 $js .= "if (!form." . $name . ".value.length) errors[errors.length] = 'the \\'" . $title . "\\' field is empty';" . $_josh["newline"];
             }
         } elseif ($type == "select") {
             $rows .= '<td>';
             $rows .= draw_form_select($name, $value, $default, $required, false, $onchange);
             $rows .= '</td>';
         } elseif ($type == "user") {
             $result = db_query("SELECT \n\t\t\t\t\t\t\t\t\t\t\tuserID, \n\t\t\t\t\t\t\t\t\t\t\tISNULL(nickname, firstname) first,\n\t\t\t\t\t\t\t\t\t\t\tlastname last \n\t\t\t\t\t\t\t\t\t\tFROM intranet_users\n\t\t\t\t\t\t\t\t\t\tWHERE isActive = 1\n\t\t\t\t\t\t\t\t\t\tORDER by lastname");
             while ($r = db_fetch($result)) {
                 $options[$r["userID"]] = $r["first"] . ", " . $r["last"];
             }
             $rows .= '<td>';
             $rows .= draw_form_select($name, $options, $default, $required, false, $onchange);
             $rows .= '</td>';
         } elseif ($type == "department") {
             $rows .= '<td><select name="' . $name . '">';
             $result = db_query("SELECT \n\t\t\t\t\t\t\t\t\t\t\tdepartmentID,\n\t\t\t\t\t\t\t\t\t\t\tdepartmentName,\n\t\t\t\t\t\t\t\t\t\t\tquoteLevel\n\t\t\t\t\t\t\t\t\t\tFROM intranet_departments\n\t\t\t\t\t\t\t\t\t\tWHERE isActive = 1\n\t\t\t\t\t\t\t\t\t\tORDER by precedence");
             while ($r = db_fetch($result)) {
                 $rows .= '<option value="' . $r["departmentID"] . '"';
                 if ($r["departmentID"] == $default) {
                     $rows .= ' selected';
                 }
                 $rows .= '>';
                 if ($r["quoteLevel"] == 2) {
                     $rows .= "&nbsp;&#183;&nbsp;";
                 } elseif ($r["quoteLevel"] == 3) {
                     $rows .= "&nbsp;&nbsp;&nbsp;-&nbsp;";
                 }
                 $rows .= $r["departmentName"] . '</option>';
             }
             $rows .= '</select></td>';
         } elseif ($type == "userpic") {
             $rows .= '<td>' . drawName($name, $value, $default, true, " ") . '</td>';
         } elseif ($type == "textarea") {
             $rows .= '<td>' . draw_form_textarea($name, $value) . '</td>';
             $js .= " tinyMCE.triggerSave();" . $_josh["newline"];
             if ($required) {
                 $js .= "if (!form." . $name . ".value.length || (form." . $name . ".value == '<p>&nbsp;</p>')) errors[errors.length] = 'the \\'" . $title . "\\' field is empty';" . $_josh["newline"];
             }
         } elseif ($type == "textarea-plain") {
             $rows .= '<td>' . draw_form_textarea($name, $value, "noMceEditor") . '</td>';
             if ($required) {
                 $js .= "if (!form." . $name . ".value.length) errors[errors.length] = 'the \\'" . $title . "\\' field is empty';" . $_josh["newline"];
             }
         } elseif ($type == "hidden") {
             $rows .= draw_form_hidden($name, $value);
         } elseif ($type == "submit") {
             $rows .= '<td colspan="2" align="center" class="bottom">' . draw_form_submit($title, "button") . '</td>';
         } elseif ($type == "button") {
             $rows .= '<td colspan="2" align="center" class="bottom">' . draw_form_button($title, $value, "button") . '</td>';
         } elseif ($type == "file") {
             $rows .= '<td>' . draw_form_file($name) . '</td>';
         }
         $rows .= '</tr>' . $_josh["newline"];
     }
 }
コード例 #7
0
ファイル: activity_edit.php プロジェクト: Rhenan/intranet-1
 selected<?php 
}
?>
>Incomplete</option>
				<option value="1" <?php 
if ($r["isComplete"]) {
    ?>
 selected<?php 
}
?>
>Complete</option>
			</select>
		</td>
	</tr>
	<tr class="helptext" bgcolor="#FFFFFF">
		<td bgcolor="#F6F6F6" valign="top"><nobr>Notes:</nobr></td>
		<td colspan="2" width="99%" valign="top"><?php 
echo draw_form_textarea("activityText", $r["activityText"]);
?>
</td>
	</tr>
	<tr bgcolor="#F6F6F6">
		<td colspan="3" align="center"><?php 
echo draw_form_submit("save changes");
?>
</td>
	</tr>
	</form>
</table>
<?php 
echo drawBottom();
コード例 #8
0
ファイル: award_view.php プロジェクト: Rhenan/intranet-1
						<table width="100%" cellpadding="0" cellspacing="0" border="0" class="small">
							<tr>
								<td width="16"><?php 
echo draw_form_checkbox("chkReport", 0);
?>
</td>
								<td width="99%">Is this a Report?</td>
							</tr>
						</table></div>
					</td>
				</tr>
				<tr>
					<td colspan="2">
						NOTES<br>
						<?php 
echo draw_form_textarea("tarDescription", "");
?>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td class="bottom"><?php 
echo draw_form_submit("add activity");
?>
</td>
	</tr>
	</form>
</table>
<?php 
コード例 #9
0
ファイル: laptop_checkout.php プロジェクト: Rhenan/intranet-1
				<tr>
					<td><?php 
echo draw_form_date("checkoutEnd");
?>
</td>
					<td>&nbsp;<?php 
echo draw_form_checkbox("noEndDate");
?>
&nbsp;</td>
					<td>(no end date)</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr valign="top">
		<td class="left">Notes</td>
		<td><?php 
echo draw_form_textarea("checkoutNotes");
?>
</td>
	</tr>
	<tr>
		<td colspan="2" class="bottom"><?php 
echo draw_form_submit("check out");
?>
</td>
	</tr>
	</form>
</table>
<?php 
echo drawBottom();