Exemplo n.º 1
0
	<?php 
echo drawHeaderRow("Percentages Report (without Vacation)", 2);
?>
	<form method="post" action="<?php 
echo $_josh["request"]["path_query"];
?>
">
	<tr>
		<td class="left">Start Date</td>
		<td><?php 
echo draw_form_select_month("start", "1/2005", false, false, "field", false, true);
?>
</td>
	</tr>
	<tr>
		<td class="left">End Date</nobr></td>
		<td><?php 
echo draw_form_select_month("end", "1/2005", false, false, "field", false, true);
?>
</td>
	</tr>
	<tr>
		<td colspan="2" class="bottom"><?php 
echo draw_form_submit("run report");
?>
</td>
	</tr>
	</form>
</table>	
<?php 
echo drawBottom();
Exemplo n.º 2
0
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;
}
Exemplo n.º 3
0
					<?php 
            if (isset($v["selected"]) && $v["selected"]) {
                $oneFound = true;
            }
        }
        ?>
				</table>
			<?php 
    }
    ?>
		</td>
	</tr>
	<?php 
}
?>
	<tr>
		<td colspan="2" align="center" class="gray">
			<?php 
if (isset($_GET["id"])) {
    echo draw_form_submit("  save changes  ");
} else {
    echo draw_form_submit("  add contact  ");
}
?>
</td>
	</tr>
	</form>
</table>

<?php 
echo drawBottom();
Exemplo n.º 4
0
    ?>
</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>
</table>
<?php 
echo drawBottom();
Exemplo n.º 5
0
 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;
 }
Exemplo n.º 6
0
    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();
Exemplo n.º 7
0
		<td class="left">Amount <div style="float:right">$</span></td>
		<td><input type="text" size="11" class="field" name="txtAmount" value="<?php 
echo @$r["awardAmount"];
?>
"></td>
	</tr>
	<tr>
		<td class="left">Project Description</td>
		<td><textarea name="tarDescription" cols="62" rows="8" class="field"><?php 
echo @$r["awardNotes"];
?>
</textarea></td>
	</tr>
	<tr>
		<td class="left"><nobr>Award Contact:</nobr></td>
		<td width="99%">
			<?php 
echo drawSelectUser("cboStaff", @$r["staffID"]);
?>
		</td>
	</tr>
	<tr>
		<td class="bottom" colspan="2"><?php 
echo draw_form_submit($button);
?>
</td>
	</tr>
	</form>
</table>
<?php 
echo drawBottom();
Exemplo n.º 8
0
 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"];
     }
 }
Exemplo n.º 9
0
echo '</table>';
?>
<table class="left" cellspacing="1">
	<?php 
echo drawHeaderRow("Attach Document", 2);
?>
	<form enctype="multipart/form-data" action="<?php 
echo $request["path_query"];
?>
" method="post" onsubmit="javascript:return validateAttachment(this);">
	<tr>
		<td class="left">Document Name</td>
		<td><?php 
echo draw_form_text("title", @$d["name"]);
?>
</td>
	</tr>
	<tr>
		<td class="left">File</td>
		<td><input type="file" name="userfile" size="40" class="field" value=""></td>
	</tr>
	<tr>
		<td class="bottom" align="center" colspan="2"><?php 
echo draw_form_submit("Attach Document");
?>
</td>
	</tr>
	</form>
</table>
<?php 
echo drawBottom();
Exemplo n.º 10
0
 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();
Exemplo n.º 11
0
							<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 
echo drawBottom();
Exemplo n.º 12
0
			<tr>
				<td width="25"><?php 
    echo draw_form_checkbox("chkl_" . $_GET["id"] . "_" . $l["id"], $l["checked"]);
    ?>
</td>
				<td><?php 
    echo $l["name"];
    ?>
</td>
			</tr>
			<?php 
}
?>
			</table>
		</td>
	</tr>
	<tr>
		<td colspan="2" align="center" class="left">
			<?php 
if ($_GET["id"]) {
    echo draw_form_submit("save changes");
} else {
    echo draw_form_submit("add organization");
}
?>
</td>
	</tr>
	</form>
</table>
<?php 
echo drawBottom();
Exemplo n.º 13
0
	<?php 
}
?>
	</form>
</table>
<br>
<table width="100%" cellpadding="3" cellspacing="1" border="0" bgcolor="#EEEEEE">
	<tr>
		<td class="bold" bgcolor="#F6F6F6" colspan="2">Add New Tag</td>
	</tr>
	<form method="post" action="<?php 
echo $request["path_query"];
?>
" onsubmit="return validate(this);">
	<tr class="helptext" bgcolor="#FFFFFF">
		<td bgcolor="#F6F6F6">Name:</td>
		<td><?php 
echo draw_form_text("tag");
?>
</td>
	</tr>
	<tr>
		<td colspan="2" align="center" bgcolor="#F6F6F6"><?php 
echo draw_form_submit("Add Tag");
?>
</td>
	</tr>
	</form>
</table>
<?php 
echo drawBottom();
Exemplo n.º 14
0
    ?>
></td>
								<td width="99%"><?php 
    echo $rg["geographicAreaDesc"];
    ?>
</td>
							</tr>
							<?php 
}
?>
						</table>
					</td>
				</tr>
			</table>
			<br><br>
		</td>
	</tr>
	<tr>
		<td align="center" colspan="2"><?php 
if (isset($_GET["id"])) {
    echo draw_form_submit("save changes");
} else {
    echo draw_form_submit("add funder");
}
?>
</td>
	</tr>
	</form>
</table>
<?php 
echo drawBottom();
Exemplo n.º 15
0
				<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();