Example #1
0
?>

<table class="left" cellspacing="1">
	<?php 
echo drawHeaderRow($r, 2);
?>
	<tr>
		<td class="left">Name</td>
		<td><b><?php 
echo $r;
?>
</b></td>
	</tr>
	<tr>
		<td class="bottom" colspan="2"><?php 
echo draw_form_button("edit name", "program_add_edit.php?id=" . $_GET["id"]);
?>
</td>
	</tr>
</table>

<table class="left" cellspacing="1">
	<tr>
		<td colspan="5" class="head">
			Funders Interesed in <?php 
echo $r;
?>
		</td>
	</tr>
<?php 
$result = db_query("SELECT \n\t\t\t\t\tf.funderID, \n\t\t\t\t\tf.name \n\t\t\t\tFROM funders_program_interests fp\n\t\t\t\tINNER JOIN funders f ON fp.funderID = f.funderID\n\t\t\t\tWHERE fp.programID = {$_GET["id"]}\n\t\t\t\tORDER BY f.name");
Example #2
0
					<td><?php 
                echo $c['phone'];
                ?>
</td>
				</tr>
				<?php 
            }
        } else {
            echo drawHeaderRow('Empty Result', 4);
            echo drawEmptyResult('No contact records contain <i>' . formatArrayForText($terms) . '</i>.');
        }
        ?>
		<!--<tr>
			<td class="bottom" colspan="4">
				<?php 
        echo draw_form_button('Add a new contact', 'contact_edit.php');
        ?>
			</td>
		</tr>-->
	</table>
	<?php 
    }
}
?>
<script>
	<!--
	document.mainsearchform.q.focus();
	//-->
</script>
<?php 
echo drawBottom();
Example #3
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"];
     }
 }
Example #4
0
if ($r["isComplete"]) {
    ?>
 selected<?php 
}
?>
>Complete</option>
			</select>
		</td>
	</tr>
	<tr>
		<td class="gray" valign="top" height="80">Notes:</td>
		<td valign="top"><?php 
echo nl2br($r["activityText"]);
?>
</td>
	</tr>
	<?php 
if ($page['is_admin']) {
    ?>
	<tr class="gray">
		<td colspan="2" align="center"><?php 
    echo draw_form_button("edit activity note", "activity_edit.php?id=" . $_GET["id"]);
    ?>
</td>
	</tr>
	<?php 
}
?>
</table>
<?php 
echo drawBottom();