All pastes #365154 Raw Edit

Miscellany

public text v1 · immutable
#365154 ·published 2007-02-20 18:46 UTC
rendered paste body
<?php defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
?>

<?php
global $mosConfig_live_site,$acl;
require( "$basedir/components/com_thopper/inc/request_type.php" );
?>
<h3 class="subheading"><?php echo _NI_NEW_ITEM; ?></h3>
		<script language="javascript" type="text/javascript">
		function submitbutton() {
			var form = document.form_new;
			var item_creator = form.item_creator.value;
			
			if ( form.summary.value == "" ) {
			    if(item_creator!=0){
					alert( "<?php echo _NI_MUST_PROVIDE_SUMMARY; ?>" );
				
				}else{
				    alert( "<?php echo _NI_MUST_PROVIDE_EMAIL; ?>" );
				
				}
			} else if ( form.detailed_desc.value == "") {
				alert( "<?php echo _NI_MUST_PROVIDE_TASKDETAILS; ?>" );
				
			} 
			else if ( item_creator!=0 && form.project.value == "") {
				//alert("xx");
				//if(form.project.value == ""){
				alert( "<?php echo _NI_MUST_PROVIDE_PROJECT; ?>" );
				//}
				
			} 
			else if ( form.request_type.value == "" ) {
				alert( "<?php echo _NI_MUST_PROVIDE_REQTYPE; ?>" );
				
			}
			else if ( form.item_type.value == "") {
				alert( "<?php echo _NI_MUST_PROVIDE_ITEMTYPE; ?>" );
				
			}
			else {
				form.submit();
			}
			
		}				
		
		function checkRequestType()
		{
			var form = document.form_new;
			//alert(form.non_task.checked);
			if (form.request_type.value=="0"){
				form.need_by.value="";
				form.need_by.disabled=true;
				form.need_by.style.backgroundColor="#999999";
				
				form.start_date.value="";
				form.start_date.disabled=true;
				form.start_date.style.backgroundColor="#999999";
				form.calendar.type = "hidden";
				form.start_calendar.type = "hidden";
			}else {
				
				form.need_by.disabled = false;
				form.need_by.style.backgroundColor="#eef7ff";
				form.start_date.disabled = false;
				form.start_date.style.backgroundColor="#eef7ff";
				form.calendar.disabled=true;
				form.calendar.type="button";
				form.start_calendar.type="button";
				
				form.calendar.disabled=false;
				form.calendar.style.backgroundColor="#eef7ff";
				form.start_calendar.disabled=false;
				form.start_calendar.style.backgroundColor="#eef7ff";
				
			}
		}
		</script>

<form name="form_new" enctype="multipart/form-data" action="<?php echo $baseurl; ?>" method="post" onSubmit="return submitbutton();">
   <table width="75%">
   <tr>
    <td>
    <input type="hidden" name="option" value="com_thopper">
	<input type="hidden" name="task" value="modify_item">
    <input type="hidden" name="action" value="newitem">
    <input type="hidden" name="item_creator" value="<?php echo"" . $my->id . "" ?>">
    
	</td><td></td>
  </tr>
  	 <tr>
  	    <td class="adminlabel"><?php
  	    //style="width:100%"
		if ( $my->id == 0 ) {
		    echo _NI_EMAIL;
		} else {
		    echo _NI_SUMMARY;
		}
?></td><td><input class="admintext" type="text" name="summary" size="50" maxlength="100"></td>
  	  </tr>
<?
if ( $my->id != 0 || $my->id !='')
 {  
?>	  
  	  <tr>
  		<td class="adminlabel"><?php echo _NI_NEEDED_BY; ?></td>
        <td>
        <?php
		$nextweek = mktime ( 0, 0, 0, date( "m" ), date( "d" ) + 7, date( "Y" ) );
		$need_by_default = date( "Y-m-d", $nextweek );

    ?>
		<input class="admintext" type="text" name="need_by" id ="need_by" size="11" maxlength="50" value="<?php echo"$need_by_default"; ?>">
   	    <input type="reset" class="button" value="..." name="calendar" onClick="return showCalendar('need_by', 'y-mm-dd');">
		<!-- import the calendar script  -->
		<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
		  <link rel="stylesheet" type="text/css" media="all" href="<?php echo $mosConfig_live_site; ?>/includes/js/calendar/calendar-mos.css" title="green" />
		<script type="text/javascript" src="<?php echo $mosConfig_live_site; ?>/includes/js/calendar/calendar.js"></script>
		<!-- import the language module 		-->
		<script type="text/javascript" src="<?php echo $mosConfig_live_site; ?>/includes/js/calendar/lang/calendar-en.js"></script>
		</td>
      </tr>
      
<!--     START DATE  -->      
<?
if ( $_SESSION['admin'] == '1' || $my->usertype=='Editor') 
{
?>
      <tr>
  		<td class="adminlabel"><?php echo _NI_START_DATE;?></td>
        <td>
        <?php
			$start_date_default = date( "Y-m-d" );
	     ?>
        <input class="admintext" type="text" name="start_date" id ="start_date" size="11" maxlength="50" value="<?php echo"$start_date_default"; ?>">

   	    <input type="reset" class="button" name="start_calendar" value="..." onClick="return showCalendar('start_date', 'y-mm-dd');">
		<!-- import the calendar script  -->
		<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
		  <link rel="stylesheet" type="text/css" media="all" href="<?php echo $mosConfig_live_site; ?>/includes/js/calendar/calendar-mos.css" title="green" />
		<script type="text/javascript" src="<?php echo $mosConfig_live_site; ?>/includes/js/calendar/calendar.js"></script>
		<!-- import the language module 		-->
		<script type="text/javascript" src="<?php echo $mosConfig_live_site; ?>/includes/js/calendar/lang/calendar-en.js"></script>
  		</td>
      </tr>
<?
	}
?>
  	  <tr>
        <td class="adminlabel"><?php echo _NI_PROJECT; ?></td>
        <td>
        <select class="adminlist" name="project">
        <?php
         echo "<option value=\"\" SELECTED>"._DI_SELECT_PLEASE."</option>";
		if ( strtolower( $my->usertype ) == 'administrator' || strtolower( $my->usertype ) == 'super administrator' ) {
		    $get_categories = $fs->dbQuery( "SELECT project_id, project_name FROM #__th_project WHERE show_in_list = '1' 
			and project_status<'100' ORDER BY project_name" );
		} else {
		   
		        $project_sql = "SELECT pr.project_id, pr.project_name,pp.modify
						FROM #__th_project pr, #__th_project_options pp
						WHERE pr.project_id=pp.project_id and
						pp.view='1' and pp.user_id='$my->id' and
						show_in_list = '1' and project_status<'100'
						ORDER BY project_name";
		   
		    	$get_categories = $fs->dbQuery( $project_sql );
		    
		}
	$num_projects = $fs->dbCountRows($get_categories);
    if($num_projects==0){
        $def_project_sql = "SELECT project_id,project_name FROM #__th_project
		WHERE project_id='".$mos_item_prefs['anon_project']."'";
		$get_defproject = $fs->dbQuery( $def_project_sql );
		while ( $row = $fs->dbFetchArray( $get_defproject ) ) {
		    echo "<option value=\"{$row['project_id']}\">{$row['project_name']}</option>";
		} ;
	}
    else{
		while ( $row = $fs->dbFetchArray( $get_categories ) ) {
		    echo "<option value=\"{$row['project_id']}\">{$row['project_name']}</option>";
		} ;
    }

?>
			</select>
        </td>
      </tr>
<?
}
?>
      <tr>
        <td class="adminlabel"><?php echo _NI_ITEM_TYPE; ?></td>
        <td>
        <select class="adminlist" name="item_type">
        <?php
        echo "<option value=\"\" SELECTED>"._DI_SELECT_PLEASE."</option>";
// Get list of task types
$get_severity = $fs->dbQuery( "SELECT type_id, type_name FROM #__th_type WHERE show_in_list = '1' ORDER BY type_position" );
while ( $row = $fs->dbFetchArray( $get_severity ) ) {
    echo "<option value=\"{$row['type_id']}\">{$row['type_name']}</option>"; 
} ;

?>
        </select>
        </td>
      </tr>
<?
if ( $my->id != 0 ) {  
	$gid 	= $acl->get_group_id( 'Public Backend', 'ARO' );
  ?>
      <tr>
        <td class="adminlabel"><?php echo _NI_STATUS; ?></td>
        <td>
        <?
        $style = "";
        
        //if ( $_SESSION['admin'] != "1" || $my->usertype!='Editor') {
        if ($my->usertype=='Registered') {
        	    $style = "style=\"background-color: #969696\" DISABLED";
		} 
        ?>
        <select class="adminlist" name="status" <? echo $style; ?>>
        <?php
	require( "$basedir/components/com_thopper/inc/itemstatus_type.php" );
	foreach( $status_list as $key => $val ) {
    	echo "<option value=\"$key\">$val</option>\n";
	} ;

?>
        </select></td>
      </tr>
      <?php
// If the user can't modify jobs, we will have to set a hidden field for the status
	if ( $_SESSION['can_modify_jobs'] != "1" ) {
    	echo "<input type=\"hidden\" name=\"item_status\" value=\"1\">";
	} ;
 	if ( $_SESSION['admin'] == '1' || $my->usertype=='Editor') {
    ?>
       <tr>
        <td class="adminlabel"><?php echo _NI_ASSIGNED_TO; ?></td>
        <td>
        <select class="adminlist" name="customer_id">
        <?php
        //echo "<option value=\"\" SELECTED>"._UNASSIGNED."</option>";
	    $get_users = $fs->dbQuery( "SELECT * FROM #__users WHERE block='0' order by name" );
    	echo "<option value=\"0\">"._UNASSIGNED."</option>\n";
    	while ( $row = $fs->dbFetchArray( $get_users ) ) {
        	echo "<option value=\"{$row['id']}\">{$row['name']} ({$row['username']})</option>\n";
    	} ;

    ?>
        </select>
        </td>
      </tr>
       <?php
	}
}
?>
      <tr>
        <td class="adminlabel"><?php echo _NI_ACTION_NEEDED; ?></td>
        <td>
        <select class="adminlist" name="request_type" onchange="checkRequestType()">
        <?php
        echo "<option value=\"\" SELECTED>"._DI_SELECT_PLEASE."</option>";
	
	foreach( $request_type_list as $key => $val ) {
    	echo "<option value=\"$key\">$val</option>\n";
	} ;

?>
        </select>
        </td>
      </tr>
     <!-- end of left column and start of right column -->
     <td valign="top">
      <tr>
        <td class="adminlabel"><?php echo _NI_URGENCY; ?></td>
        <td>
        <select class="adminlist" name="urgency">
        <?php
		require( "$basedir/components/com_thopper/inc/urgency_type.php" );
		foreach( $urgency_list as $key => $val ) {
		    echo "<option value=\"$key\">$val</option>\n";
		} ;

		?>
        </select>
        </td>
      </tr>
<?
	if ( $_SESSION['admin'] == '1' || $my->usertype=='Editor') 
	{  
?>	
	<tr>
        <td class="adminlabel"><?php echo _NI_ESTIMATED; ?></td>
        <td>
        	<input class="admintext" type="text" name="estimated" style="width:10%" maxlength="100">
			<span class="adminlabel"> hours</span>
        </td>
      </tr>
      <?php
	}
	if ( $my->id != 0 ) 
	{
    ?>
      <tr>
      <td colspan="2">
      <table width="100%">
		<tr>
		<td align="right" class="adminlabel"><?php echo _NI_UPLOAD_FILE; ?></td>
		<td align="left"><input class="admintext" type="file" size="35" name="userfile"></td>
		</tr>
		<tr>

		<td align="right" class="adminlabel"><?php echo _NI_ATTACH_DESCR; ?></td>
		<td align="left"><input class="admintext" type="text" name="file_desc" size="50" maxlength="100"></td>
		</tr>
		<tr>
		</tr>
	</table>
	</td>
    </tr>
    <?php
	}

?>
    <tr>
    <td colspan="2">
    <table width="70%">
    
<tr>
        <td class="adminlabel">Description</td></tr>
   <tr><td><textarea class="admintext" name="detailed_desc" cols="55" rows="5"></textarea></td>
    </tr>
    </table>
    </td>
    </tr>



<!-- old RFQ -->

<tr>
<td colspan="2"><table width="70%">
<td class="adminlabel" width="160px">Account Manager ID:<font size="2" face="Arial" color="red"> *</font></td>

<td align="left">
<input type="text" name="acct_manager" class="inputbox" size="10" validate="required">
    </td>
    </table>
    </td>
    </tr>



<tr>
<td colspan="2"><table width="70%">
        <td class="adminlabel" width="160px">Account Manager Email:<font size="2" face="Arial" color="red"> *</font></td>

<td align="left">	
<input name="acct_manager_email" id="email" class="inputbox" type="email" maxlength="20">
    </td>
    </table>
    </td>
    </tr>



<tr>
<td colspan="2"><table width="70%">
        <td class="adminlabel" width="160px">Sales Rep's Manager<font size="2" face="Arial" color="red"> *</font></td>
<td>
<font face="Arial" size="-2"><br>Select your manager from the list</font><br>
<font face="Arial" size="2"><select type="select" name="location" class="inputbox" size="1">
<option></option>
<option value="Chrisp@aplus.net" >Chris Plueger</option>
<option value="philipl@aplus.net" >Phil Lancashire</option>
<option value="allyd@aplus.net" >Ally Dole</option>
<option value="kerrys@aplus.net" >Kerry Stevens</option>
<option value="nasc@aplus.net" >Nas Chad</option>
</select></font>
<td>   
 </table>
    </td>
    </tr>



<tr>
<td colspan="2"><table width="70%">
        <td class="adminlabel" width="160px">Customer Name:<font size="2" face="Arial" color="red"> *</font></td>
<td><input type="text" name="customer_name" class="inputbox" size="20"></font><b><font face="Arial" size="-2" color="red"></font></b><font face="Arial" size="-2"><br></font>
    </td>
    </table>
    </td>
    </tr>



<tr>
<td colspan="2"><table width="70%">
         <td class="adminlabel" width="160px">Customer Account (AP) #:<font size="2" face="Arial" color="red"></font></td>
<td>
<font face="Arial" size="2"><input type="text" name="ap_number" class="inputbox" size="20"></font><b><font face="Arial" size="-2" color="red"></font></b>
    </td>
    </table>
    </td>
    </tr>




<tr>
<td colspan="2"><table width="70%">
         <td class="adminlabel" width="160px">Customer Company Name:<font size="2" face="Arial" color="red"></font></td>

<td><input type="text" name="customer_company" class="inputbox" size="20"></font><b><font face="Arial" size="-2" color="red"></font></b><font face="Arial" size="-2"><br></font>
    </td>
    </table>
    </td>
    </tr>





<tr>
<td colspan="2"><table width="70%">
         <td class="adminlabel" width="160px">Customer Phone #:<font size="2" face="Arial" color="red"></font></td>

<td><input type="text" name="customer_phone" class="inputbox" size="15"></font><b><font face="Arial" size="-2" color="red"></font></b><font face="Arial" size="-2"><br></font>
    </td>
    </table>
    </td>
    </tr>




<tr>
<td colspan="2"><table width="70%">
<td class="adminlabel" width="160px">Customer Email:<font size="2" face="Arial" color="red"> *</font></td>

<td><input type="email" name="customer_email" id="customer_email" class="inputbox" maxlength="20">
    </td>
    </table>
    </td>
    </tr>




<tr>
<td colspan="2"><table width="100%">

<td class="adminlabel" width="160px">Web site type:<font size="2" face="Arial" color="red"> *</font></td>


<td><font face="Arial" size="-2">Describe the general type of website</font><br>
<textarea type="textarea" name="description" class="inputbox" rows="2" cols="35"></textarea>
    </td>
    </table>
    </td>
    </tr>




<tr>
<td colspan="2"><table width="100%">

<td class="adminlabel" width="160px">How will the customer get revenue from the site?<font size="2" face="Arial" color="red"> *</font></td>

<td><font face="Arial" size="-2">How are they planning on making money?</font><br>
<textarea type="textarea" name="revenue" class="inputbox" rows="2" cols="35"></textarea>
    </td>
    </table>
    </td>
    </tr>




<tr>
<td colspan="2"><table width="100%">

<td class="adminlabel" width="160px">Features the customer wants:<font size="2" face="Arial" color="red"> *</font></td>

<td><textarea type="textarea" name="features" class="inputbox" rows="2" cols="35"></textarea>
    </td>
    </table>
    </td>
    </tr>




<tr>
<td colspan="2"><table width="100%">

<td class="adminlabel" width="160px">Special requirements (Unique features):<font size="2" face="Arial" color="red"></font></td>

<td><textarea type="textarea" name="unique_features" class="inputbox" rows="2" cols="35"></textarea>
    </td>
    </table>
    </td>
    </tr>




<tr>
<td colspan="2"><table width="70%">

<td class="adminlabel" width="160px">Does the customer want a Member Area?<font size="2" face="Arial" color="red"> *</font></td>

<td><select type="select" name="member_area" class="inputbox" size="1">
<option></option>
<option value="Yes" >Yes</option>
<option value="No" >No</option>
</select>
    </td>
    </table>
    </td>
    </tr>




<tr>
<td colspan="2"><table width="70%">

<td class="adminlabel" width="160px">How many products is he/she going to sell?<font size="2" face="Arial" color="red"> *</font></td>

<td><input type="text" name="product_number" class="inputbox" size="10">
    </td>
    </table>
    </td>
    </tr>




<tr>
<td colspan="2"><table width="70%">

<td class="adminlabel" width="160px">Who is going to input the data?</font><font size="2" face="Arial" color="red"> *</font></td>

<td><select type="select" name="data_input" class="inputbox" size="1">
<option></option>
<option value="Aplus" >Aplus</option>
<option value="Customer" >Customer</option>
</select>
    </td>
    </table>
    </td>
    </tr>




<tr>
<td colspan="2"><table width="70%">

<td class="adminlabel" width="160px">Will the customer add more categories / products<font size="2" face="Arial" color="red"> *</font></td>

<td><select type="select" name="more_products" class="inputbox" size="1">
<option></option>
<option value="yes" >Yes</option>
<option value="no" >No</option>
</select>
    </td>
    </table>
    </td>
    </tr>




<tr>
<td colspan="2"><table width="100%">

<td class="adminlabel" width="160px">Similar web sites:</font><font size="2" face="Arial" color="red"> *</font></td>

<td>
<font face="Arial" size="-2">Enter any sites that the customer feels are similar to the one they want</font><br>
<textarea type="textarea" name="similar_sites" class="inputbox" rows="2" cols="35"></textarea>
    </td>
    </table>
    </td>
    </tr>




<tr>
<td colspan="2"><table width="100%">

<td class="adminlabel" width="160px">Which features does he/she like/dislike?</font><font size="2" face="Arial" color="red"></font></td>

<td><font face="Arial" size="-2">Of the features on the similar sites, which ones does he like or dislike?</font><br>
<textarea type="textarea" name="features_like" class="inputbox" rows="2" cols="35"></textarea>
    </td>
    </table>
    </td>
    </tr>




<tr>
<td colspan="2"><table width="70%">

<td class="adminlabel" width="160px">Number of Static HTML Pages:</font><font size="2" face="Arial" color="red"> *</font></td>

<td><input type="text" name="static_pages" class="inputbox" size="7"></font>
    </td>
    </table>
    </td>
    </tr>




<tr>
<td colspan="2"><table width="70%">

<td class="adminlabel" width="160px">Design Plan:</font><font size="2" face="Arial" color="red"> *</font></td>

<td>
<font face="Arial" size="-2"><br>Select the design plan you feel is appropriate</font><br>
<select type="select" name="design_plan" class="inputbox" size="1">
<option></option>
<option value="Palette" >Palette</option>
<option value="Sunshine" >Sunshine</option>
<option value="Rainbow " >Rainbow </option>
<option value="Reflections" >Reflections</option>
<option value="No Design Plan Selected" >No Design Plan</option>
</select>
    </td>
    </table>
    </td>
    </tr>




<tr>
<td colspan="2"><table width="70%">

<td class="adminlabel" width="160px">Flash Template<font size="2" face="Arial" color="red"></font></td>

<td><input type="text" name="flash_template" class="inputbox" size="20">
    </td>
    </table>
    </td>
    </tr>




<tr>
<td colspan="2"><table width="100%">

<td class="adminlabel" width="160px">Add-Ons:<font size="2" face="Arial" color="red"></font></td>

<td><textarea type="textarea" name="addons" class="inputbox" rows="2" cols="35"></textarea>
    </td>
    </table>
    </td>
    </tr>




<tr>
<td colspan="2"><table width="100%">

<td class="adminlabel" width="160px">Comments, Concerns or Clarifications:<font size="2" face="Arial" color="red"></font></td>

<td><font face="Arial" size="-2">Any additional information that may need to be added</font><br>
<textarea type="textarea" name="comments" class="inputbox" rows="2" cols="35"></textarea>
    </td>
    </table>
    </td>
    </tr>



<!-- end old RFQ -->




  
   

 <tr>
    <td colspan="2">
     <br>
          <input class="adminbutton" type="button" name="buSubmit" onclick="submitbutton()" value="<?php echo _NI_ADD_ITEM; ?>">
	  </div>
	</td>
  </tr>
</table>
</form>