Exemple #1
0
//ini_set('display_errors',1);
require_once 'app_code/config.inc.php';
require_once 'class/class.contacts.php';
require_once 'class/class.project.php';
require_once 'class/class.note.php';
require_once 'class/class.tasks.php';
require_once 'class/class.GlobalTask.php';
$page = new basic_page();
$page->auth->Checklogin();
$notify = new Notification();
$ajax = new PHPLiveX();
$project = new Project();
$note = new Note();
$user = new User();
$task = new Tasks();
$global_task = new GlobalTask();
$task->SetUserObject($user);
$task->SetUserID($page->auth->Get_user_id());
$ajax->AjaxifyObjects(array("project", "task", "global_task"));
$page->setPageKeywords('');
$page->setPageDescription('');
$page->setPageTitle("PROJECT PROFILE");
$page->setActiveButton('9');
//$page -> setInnerNav('');
//$page -> SetDynamicCSS_1('main_style.css');
//$page -> SetDynamicCSS_2('form.css');
$page->SetDynamicCSS_1('main_style.php');
$page->SetDynamicCSS_2('form.php');
$page->setImportCss3('css/all.css');
$page->setImportCss4('src/css/jscal2.css');
$page->setImportCss5('src/css/border-radius.css');
Exemple #2
0
    function showFlowChartTask($module_name = '', $module_id = '')
    {
        ob_start();
        $sql = "SELECT * FROM " . ASSIGN_FCT . " a LEFT JOIN " . GLOBAL_TASK . " b ON a.flow_chart_id=b.global_task_id LEFT JOIN " . TBL_USERGROUP . " c ON b.department_id = c.group_id WHERE a.module = '{$module_name}' AND a.module_id = '{$module_id}' and a.task_status = 'Active'";
        //echo $sql;
        $result = $this->db->query($sql);
        $global_task = new GlobalTask();
        ?>
		 <table>
		 	<?php 
        while ($row = $this->db->fetch_assoc($result)) {
            ?>
				<tr>
					<td><span class="emaildashboard_menutitle"><?php 
            echo $row['group_name'];
            ?>
</span> - </td>
					<td>&nbsp;<span class="emaildashboard_menutitle"><?php 
            echo $row['name'];
            ?>
</span> - </td>
					<td>&nbsp;
							<?php 
            $owner_module_name = $global_task->getOwnerModuleName($row['owner_module_name'], $row['owner_module_id']);
            echo $global_task->displayOwnerModuleLink($row['module'], $row['module_id'], $row['flow_chart_id'], $owner_module_name, $row['chart_assign_id']);
            ?>
                    </td>
					<td>&nbsp;<span class="emaildashboard_menutitle">
							<?php 
            $date_part = explode(" ", $row['created_date']);
            $dt = explode("-", $date_part[0]);
            echo $dt[1] . "/" . $dt[2];
            ?>
                        </span></td>
				</tr>
			<?php 
        }
        ?>
		 </table>
		 <?php 
        $html = ob_get_contents();
        ob_end_clean();
        return $html;
    }
Exemple #3
0
  function FlowChartDiv( $module_name , $module_id ){

	  $module_name_true = $module_name;
      $module_name = str_replace( ' ' , '' , $module_name );
      ob_start();
	  $global_task = new GlobalTask();
      ?>
      <div id="flowcharttask_<?php echo $module_name . '_' . $module_id;?>">
        <a href="javascript:void(0);" onClick="javascript: workorder.check_shipdate('<?php echo $_REQUEST[order_id];?>',
																					{onUpdate:function(response,root){
																						if(response){
																						  $('#flowcharttask_add_<?php echo $module_name . '_' . $module_id;?>').show();
																						}
																						else{
																						 alert('Ship Date for this order does not exist');
																						}
																					}}); ">
			add Flow Chart Task
		</a>
        <div style="display: none;" id="flowcharttask_add_<?php echo $module_name . '_' . $module_id;?>">
            <?php echo $global_task->AddFlowChartTask($module_name_true, $module_id , '' , '' , "$('#flowcharttask_add_" . $module_name . '_' . $module_id . "').hide()" , $_REQUEST[order_id]);?>
        </div>

		<div id="flowcharttask_options_<?php echo $module_name . '_' . $module_id;?>">
			<?php echo $global_task->displayByModuleId($module_name_true, $module_id, "flowcharttask_options_" . $module_name . '_' . $module_id,'',$_REQUEST[order_id]);?>
		</div>
      </div>


      <?php
      $html=ob_get_contents();
      ob_end_clean();
      return $html;
  }
Exemple #4
0
        function FlowChartDiv( $module_name , $module_id , $div_type , $overide = array() ){
                $disable_tree = false;
                $rand = rand( 0 , 99999999999999);
                $module_name_true = $module_name;
                $module_name = str_replace( ' ' , '' , $module_name );
                ob_start();
                $div_type .= "_$rand";
                $global_task = new GlobalTask();
                ?>
                <div id="flowcharttask_<?php echo $div_type . '_' . $module_name . '_' . $module_id;?>">
                        <table >
                          <tr >
                                <td colspan="2">
                                    <a href="javascript:void(0);" 
                                       <?php 
                                       if(true){ 
                                        $default_task = $this->get_default_flowchart($module_name);
                                        //if( $default_task !== false && $this->has_flowchart_task($module_name, $module_id) == false  ){ 
                                        if( true ){
                                            $div_id = "flowcharttask_" . $div_type . '_' . $module_name . '_' . $module_id; ?>
                                           onclick="javascript:slimcrm.case_fct_single=true;setTimeout( function(){ if( slimcrm.case_fct_single == true ){global_task.AddFlowChartTask('<?php echo $module_name_true; ?>', 
    															  '<?php echo $module_id; ?>',
																  '<?php echo $default_task['global_task_id']; ?>',
																  '<?php echo $default_task['global_task_id']; ?>',
																  '<?php  echo str_replace( "'" , "\\'" , $whenDonejs); ?>', 
																  '<?php echo $div_id; ?>',
																  { target:'<?php echo $div_id; ?>' , onUpdate: function(response , root){$('.right_tab_right_arrow_active').click();}} ); }} , 500 );"
                                        <?php } else { ?>
                                           onclick="$('.flowcharttask_add_<?php echo $div_type . '_' . $module_name . '_' . $module_id ; ?>').show();" 
                                        <?php }
                                            
                                       ?>
                                       ondblclick="slimcrm.case_fct_single=false;$('.flowcharttask_add_<?php echo $div_type . '_' . $module_name . '_' . $module_id ; ?>').show();"
                                       <?php } ?>
                                       ><button class="add_flowchart" >Create Flow Chart Task<div class="add_button in_button" >&nbsp;</div></button></a>
                                </td>
                          </tr>
                          <tr colspan="2">
                                <td>
                                  <div style="display:none;" class="flowcharttask_add_<?php echo $div_type . '_' . $module_name . '_' . $module_id;?> flowcharttask_add_<?php echo $module_name;?>" id="flowcharttask_add_<?php echo $div_type . '_' . $module_name . '_' . $module_id;?>">
                                    <?php 
                                    //   $global_task->AddFlowChartTask($module_name,      $module_id, $tree, $global_task_id, $whenDonejs, $div_id)
                                    echo $global_task->AddFlowChartTask($module_name_true, $module_id , $global_task->get_default_tree( $module_name)  , ''             , "$('.flowcharttask_add_" . $div_type . '_' . $module_name . '_' . $module_id . "_$rand" . "').hide();$('.right_tab_right_arrow_active').click();","flowcharttask_add_" . $div_type . '_' . $module_name . '_' . $module_id , $disable_tree);?>
                                  </div>
                                </td>
                          </tr>
                          <tr >
                                <td colspan="2">
                                    <div id="flowcharttask_options_<?php echo $div_type . '_' . $module_name . '_' . $module_id;?>" class="flowcharttask_options flowcharttask_options_<?php echo $module_name; ?>">
                                    <?php echo $global_task->displayByModuleId($module_name_true, $module_id, "flowcharttask_options_" . $div_type . '_' . $module_name . '_' . $module_id,'');?>
                                    </div>
                                </td>
                          </tr>
                        </table>
                </div>
                <?php
                $html=ob_get_contents();
                ob_end_clean();
                return $html;
   }
Exemple #5
0
require_once 'class/class.casecreation.php';
require_once 'class/class.dynamicpage.php';
require_once 'class/class.FctSearchScreen.php';
require_once 'class/class.eapi_order.php';
require_once 'class/class.cases.php';
require_once 'class/class.welcome.php';
ob_end_clean();
$flags = new Flags();
$page = new basic_page();
$emaildash = new email_client();
$casecreation = new case_creation($page);
$run_on_start = array();
$user = new user();
$welcome = new welcome();
$welcome_news = $welcome->get_news();
$global_task = new GlobalTask();
?>
<script>

</script>

<table style="width: 80%;padding-left: 10%;padding-right: 10%;" ><tr><td style="width: 50%;vertical-align: top;">
<div class="admin_page_header page_header" >Admin Page</div>
<?php 
if ($page->auth->inGroup('csradmin')) {
    ?>
<div style=" width: 550px" class="ui-accordion ui-accordion-icons" >
<h3 class="ui-accordion-header  a ui-helper-reset ui-state-default ui-state-active ui-corner-top single_accordion" 
    onclick="
        $('#manage_top_users').toggle();
        $(this).toggleClass('ui-state-active');$(this).children('span').toggleClass('ui-icon-triangle-1-s').toggleClass('ui-icon-triangle-1-e')" >
Exemple #6
0
	function showdetail_data($group_id='')
	{
          $group_info = $this->db->fetch_assoc($this->db->query("SELECT * FROM `erp_create_group` WHERE group_id = '$group_id'"));
		ob_start();?>
		<table class="table" width="100%">
		<tbody>
			 <tr>
				<th>Printer :</th>
					<td>
					<select name="select_printer" id="select_printer" style="width:100%;" 
									onchange="javascript:group_display.set_group_option( 'printer' , this.value ,  '<?php echo $group_id; ?>',
																					{preloader:'prl'});
																					
													group_display.show_searchtable({preloader:'prl',
																					onUpdate: function(response,root){
												                                    document.getElementById('task_area').innerHTML=response;
																					$('#search_table')
												                                    .tablesorter({widthFixed: true, widgets: ['zebra'], sortList: [[0,0]]}); }});
																					">
								<option value="">--Select--</option>
									<?php  $result = $this->db->query("SELECT * FROM `erp_printer_paper`");
										while( $row = $this->db->fetch_assoc($result)){
											?>
											<option value="<?php echo $row["id"];?>" <?php if($group_info["printer"] == $row["id"] ){ echo "SELECTED"; }?> >
												<?php echo $row["printer"]; ?>
											</option> 
											<? } ?>
                      </select>
					</td>
			 </tr>
			 <tr>
			 <th>Fabric Roll :</th>
				 <td>
				 <select name="fabric" id="fabric" style="width:100%;"
				 					onchange="javascript:group_display.set_group_option( 'fabric_rolles' , this.value , '<?php echo $group_id; ?>',
																					{preloader:'prl'});
																					
													group_display.show_searchtable({preloader:'prl',
																					onUpdate: function(response,root){
												                                    document.getElementById('task_area').innerHTML=response;
																					$('#search_table')
												                                    .tablesorter({widthFixed: true, widgets: ['zebra'], sortList: [[0,0]]}); }});
																					">
							<option value="">--Select--</option>
							<?php 
							
							$sql_inve="Select distinct a.inventory_id,a.name,c.id,c.inches from ".TBL_INVENTORY_DETAILS." a, ".erp_GROUP." b, ".TBL_FABRIC_ROLLS." c where a.name=b.inventory_name and b.group_id='$group_id' and c.fabric_type=a.inventory_id";
							$result_inve=$this->db->query($sql_inve,__FILE__,__LINE__);
							
							if( $this->db->num_rows($result_inve)>0 ){
							
							while($row_inve=$this->db->fetch_array($result_inve)){?>
						     <option value="<?php echo $row_inve['id'] ;?>" <?php if($group_info["fabric_rolles"] == $row_inve["id"] ){ echo "SELECTED"; }?>  ><?php echo $row_inve['id'].'-'.$row_inve['name'].'-'.$row_inve['inches'] ;?></option>
							 <?php }} ?>
				   </select>
				 </td>
			 </tr>
			 <tr>
			 	<th>Tasks</th>
			 </tr>
			 <tr>
				 <td colspan="2">
                                     
				 <div id="group_task_<?php echo $group_id;?>" >
					<?php
					$global_task = new GlobalTask();
                    $global_task->displayByGroupID( $group_id );
					?>
				 </div>
				 </td>
			 </tr>
			 <tr>
			 	<th>Orders</th>
			</tr>
			<tr>
				<table width="100%" class="event_form small_text">
					<thead>
					<tr>
						<th>Order Id</th>
						<th>WO Id</th>
						<th>Module</th>						
						<th>Name</th>
						<th>Inches</th>
						<th>Due to Print</th>
						<th>Ship Date</th>
					</tr>
					</thead>
					<tbody>
					  <?php 
						$sql_type= "select distinct a.*,b.ship_date from ".erp_GROUP." a , " .erp_ORDER." b where a.group_id='$group_id' and a.order_id=b.order_id" ;
						
						$result_type=$this->db->query($sql_type,__FILE__,__LINE__);
						if( $this->db->num_rows($result_type)>0 ){
							while($row_type=$this->db->fetch_array($result_type)){?>
							<tr>
								<td><a href="order.php?order_id=<?php echo $row_type['order_id'];?>"><?php echo $row_type['order_id']; ?></a></td>
								<td><a href="order.php?order_id=<?php echo $row_type['order_id'];?>"><?php echo $row_type['workorder_id']; ?></a></td>	
								<td><?php echo $row_type['type'];?></td>								  
								<td><?php echo $row_type['inventory_name']; ?></td>
								<td><?php echo $row_type['inches']; ?></td>
								<?php 
									$sql_due="Select due_date from ".erp_ASSIGN_FCT." where chart_assign_id='$row_type[assign_fct_id]'";
									$result_due=$this->db->query($sql_due,__FILE__,__LINE__);
									$row_due=$this->db->fetch_array($result_due);
								?>
								<td><?php echo $row_due['due_date']; ?></td>
								<td><?php echo $row_type['ship_date']; ?></td>
					  </tr> 
						<?php
							} 
						}
						else
						{?>
							<tr><td colspan="4">No Record Found!!!!</td></tr>
						<?php } ?>
					</tbody>
				</table>
			</tr>
			<tr>
				<th>Available Fabric</th>
			</tr>
			<tr>
				<table id="fabric_table" class="event_form small_text" width="100%">
			<thead>
			   <tr>
				  <th>Fabric</th>
				  <th>Roll #</th>
				  <th>Inches</th>
                  <th>Location</th>
			  </tr>
			</thead>
			<tbody>
			  <?php 
			  $sql_type="Select distinct a.inventory_id,a.name,c.* from ".TBL_INVENTORY_DETAILS." a, ".erp_GROUP." b, ".TBL_FABRIC_ROLLS." c where a.name=b.inventory_name and b.group_id='$group_id' and c.fabric_type=a.inventory_id";
			  $result_type=$this->db->query($sql_type,__FILE__,__LINE__);
				if( $this->db->num_rows($result_type)>0 ){
					while($row_type=$this->db->fetch_assoc($result_type)){?>
					<tr>
						<td><?php echo $row_type['name']; ?></td>	  
						<td><?php echo $row_type['id']; ?></td>
						<td><?php echo $row_type['inches']; ?></td>
						<td><?php echo $row_type['location_id']; ?></td>
			  </tr> 
                <?php
					} 
				}
				else
				{ ?>
					<tr><td colspan="4">No Record Found!!!!</td></tr>
				<?php } ?>
			</tbody>
		 </table>
			</tr>
		  </tbody>
		</table>
		<?php
		$html=ob_get_contents();
		ob_end_clean();
		return $html;
	}
Exemple #7
0
<?php

//ini_set('display_errors',1);
$case = new cases();
$global_tasks = new GlobalTask();
$contacts = new contacts();
//$sql = $case->search_query( array('case_id' => $options['case_id'] ) );
$sql = "SELECT * FROM contacts WHERE contact_id = '" . $options['contact_id'] . "'";
$array = $this->db->fetch_assoc($this->db->query($sql));
$array['tasks'] = array();
$tasks = $global_tasks->search_flow_chart_tasks(array('module' => 'contacts', 'module_id' => $options['contact_id']));
foreach ($tasks as $n => $v) {
    //$v['name'] = $v['subject'];
    $v['task_type'] = 'global_task';
    $v['task_id'] = $v['chart_assign_id'];
    $v['access'] = $global_tasks->check_permitions($v);
    $v['options'] = $global_tasks->get_flowchart_options($v['flow_chart_id']);
    $array['tasks'][] = $v;
}
$array['activity'] = $this->get_activity_log_by_module('contacts', $options['contact_id']);
$array['followers'] = $this->follow->get_followers_by_module('contacts', $options['contact_id']);
$array['phone'] = $contacts->get_contact_phone($options['contact_id']);
$array['email'] = $contacts->get_contact_email($options['contact_id']);
$array['address'] = $contacts->get_contact_address($options['contact_id']);
$array['im'] = $contacts->get_contact_im($options['contact_id']);
if (array_key_exists($_SESSION['user_id'], $array['followers'])) {
    $array['following'] = true;
} else {
    $array['following'] = false;
}
$sql = $case->search_query(array('module_name' => 'contacts', 'module_id' => $options['contact_id']));
    $asterisk = new Asterisk();
}
$contact_id = $vars['contact_id'];
$em = new Event_Contacts();
$em->SetContactID($contact_id);
$contact = new Contacts();
$evt = new Event();
$page = new basic_page();
$note = new Note();
$task = new Tasks();
$notify = new Notification();
$cases = new cases();
$cert = new Certification_Type();
$app = new Application();
$dynamic_page = new dynamic_page();
$global_tasks = new GlobalTask();
?>
<table style="width: 100%"><tr><td style="width:70%;vertical-align: top;padding-right: 20px;" >
<div id="div_credential"  class="" style="display:none;"></div>
<div id="prl" style="display:none;"><img  id="prl_image" src="images/spinner.gif"  /></div>
<div id="content_column_header">
		<?php 
echo $em->GetContactHead($contact_id, 'display_tag', 'em');
?>
		
			
			<div class="edit_link" id="edit_link"><?php 
/*?> $app->getResumeLink($em->GetContactID()); ?> | <?php echo $em->ResetPassword($em->GetContactID()) ?> |
		<a style="color:#FF0000;" href="javascript:void(0)" onclick="javascript: em.addLocation('local',<?php echo $em->GetContactID(); ?>,'div_credential',
		{ onUpdate: function(response,root){ 	
	   					 document.getElementById('div_credential').innerHTML=response;
Exemple #9
0
session_start();
$_SESSION[inc] = 1;
$_SESSION[y] = 1;
$_SESSION[total_est_day] = 0;
$_SESSION[percentage] = 0;
//$_SESSION[count12]='';
//ini_set('display_errors',1);
require_once 'class/config.inc.php';
require_once 'app_code/config.inc.php';
require_once 'class/class.tasks.php';
require_once 'class/class.GlobalTask.php';
$page = new basic_page();
$page->auth->Checklogin();
$user = new User();
$notify = new Notification();
$global_task = new GlobalTask();
$ajax = new PHPLiveX();
$ajax->AjaxifyObjects(array("global_task"));
/**********************************************/
/*******Setting Page access Rules & checking Authorization****************/
/*$access_rule = array(	"Admin"		=>"Admin" 
					);
$page -> setAccessRules($access_rule);
$page -> setAccessRulesType('all');		// any or all
$page -> CheckAuthorization();
*/
/************************************************************************/
$page->setPageKeywords('');
$page->setPageDescription('');
$page->setPageTitle("FLOW CHART TASK");
$page->setActiveButton('3');
Exemple #10
0
    width: 200px !important;
}

.table td {
    font-size: 14px;
}

#content_column_header {
    font-weight: normal;
    line-height: 20px;
	color: white;
}

';
//$page_style = '';
$page->setPageStyle($page_style);
$page->displayPageTop('full');
$global_task = new GlobalTask();
$ajax->AjaxifyObjects(array("global_task"));
$ajax->Run('phplivex.js');
// Must be called inside the 'html' or 'body' tags
// **********************Start html for content column ****************************//
$notify->Notify();
// **********************Closes the Content Column and begins Info Column ****************************//
$page->printContentColumnEnd();
// **********************Start code for Info Column ****************************//
echo $global_task->display_flowchart_by_module('EMAIL', 1);
?>

<?php 
$page->displayPageBottom();
Exemple #11
0
<?php

$query = $_REQUEST["term"];
ob_start();
require_once 'app_code/global.config.php';
require_once 'class/config.inc.php';
//echo __LINE__ . "\n";
require_once 'class/class.email_client.php';
//echo __LINE__ . "\n";
require_once 'class/class.flags.php';
//echo __LINE__ . "\n";
require_once 'class/class.GlobalTask.php';
//echo __LINE__ . "\n";
require_once 'class/class.smtp.php';
//echo __LINE__ . "\n";
require_once 'class/class.display.php';
//echo __LINE__ . "\n";
require_once 'class/class.casecreation.php';
//echo __LINE__ . "\n";
require_once 'class/class.dynamicpage.php';
//echo __LINE__ . "\n";
require_once 'class/class.FctSearchScreen.php';
//echo __LINE__ . "\n";
require_once 'class/class.eapi_order.php';
require_once 'class/class.eapi_account.php';
require_once 'class/class.cases.php';
require_once 'class/class.note.php';
ob_end_clean();
$global_task = new GlobalTask();
echo $global_task->json_search_fctname($query);
Exemple #12
0
<?php

$avalible_keys = array("chart_assign_id" => "chart_assign_id", "tree_id" => "tree_id", "module" => "module", "module_name" => "module", "flow_chart_id" => "flow_chart_id", "task_status" => "task_status", "profile_page" => "profile_page", "module_id" => "module_id", "created_date" => "created_date", "optional1" => "optional1", "due_date" => "due_date", "completion_date" => "completion_date", "projected_path_due_date" => "projected_path_due_date", "owner_module_name" => "owner_module_name", "owner_module_id" => "owner_module_id", "Owner" => "Owner", "due_date_min" => "due_date_min", "due_date_max" => "due_date_max", "CreatedOn_min" => "CreatedOn_min", "created_after_date" => "created_after_date", "CreatedOn_max" => "CreatedOn_max", "created_befor_date" => "created_befor_date", "attached_module" => "attached_module", "owner_module" => "owner_module", "status_id" => "status_id", "completion_result" => "completion_result", "name" => "name", "global_task_id" => "global_task_id", "department_id" => "department_id");
$search = array();
foreach ($options as $n => $v) {
    if (array_key_exists($n, $avalible_keys)) {
        $search[$avalible_keys[$n]] = $v;
    }
    switch ($n) {
        case 'self':
            if ($v == 'true') {
                $search['Owner'] = $_SESSION['user_id'];
            }
            break;
    }
}
$array = array();
$global_tasks = new GlobalTask();
if (!array_key_exists('task_type', $options) || $options['task_type'] == 'global_task') {
    $tasks = $global_tasks->search_flow_chart_tasks($search);
    foreach ($tasks as $n => $v) {
        //$v['name'] = $v['subject'];
        $v['task_type'] = 'global_task';
        $v['module_name'] = $v['module'];
        $v['task_id'] = $v['chart_assign_id'];
        $v['access'] = $global_tasks->check_permitions($v);
        $v['options'] = $global_tasks->get_flowchart_options($v['flow_chart_id']);
        $array['data'][] = $v;
    }
}