Esempio n. 1
0
 $do_user->get_all_users();
 $group_transfer = false;
 $do_group = new Group();
 $do_group->get_all_groups();
 //if there is no group then there is no group to trasfer data
 if ($do_group->getNumRows() > 0) {
     $group_transfer = true;
 }
 if (true === $hide_group) {
     $group_transfer = false;
 }
 $do_fields = new CRMFields();
 $do_fields->query("select `idfields` from `fields` where `field_name` = 'assigned_to' AND `idmodule` = ?", array($module_id));
 $fieldid = 0;
 if ($do_fields->getNumRows() > 0) {
     $do_fields->next();
     $fieldid = $do_fields->idfields;
 }
 $e_change = new Event("CRMEntity->eventChangeAssignedToEntity");
 $e_change->addParam("ids", $ids);
 $e_change->addParam("module", $module);
 $e_change->addParam("module_id", $module_id);
 $e_change->addParam("fieldid", $fieldid);
 $e_change->addParam("next_page", NavigationControl::getNavigationLink($obj, $return_page));
 if ($group_transfer === true) {
     $e_change->addParam("group_transfer_opt", "yes");
 } else {
     $e_change->addParam("group_transfer_opt", "no");
 }
 echo '<form class="form-horizontal" id="CRMEntity__eventChangeAssignedToEntity" name="CRMEntity__eventChangeAssignedToEntity" action="/eventcontroler.php" method="post">';
 echo $e_change->getFormEvent();
Esempio n. 2
0
	<div class="modal-content">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			<h3><span class="label label-info"><?php 
    echo _('Change Event Status');
    ?>
</span></h3>
		</div>
		<div class="modal-body">
			<?php 
    echo _('Please select a status');
    ?>
<br />
			<select name="event_status" id="event_status" class="form-control input-sm">
			<?php 
    while ($do_fields->next()) {
        echo '<option value="' . $do_fields->combo_value . '">' . $do_fields->combo_option . '</option>';
    }
    ?>
			</select>
		</div>
		<div class="modal-footer">
			<a href="#" class="btn btn-default active" data-dismiss="modal"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> <?php 
    echo _('Cancel');
    ?>
</a>
			<input type="submit" class="btn btn-primary" value="<?php 
    echo _('Change');
    ?>
"/>
		</div>
Esempio n. 3
0
    /**
     * function to export list data as PDF
     * @param string $file_name
     * @param array $fields_info
     * @param integer $module_id
     * Library used for PDF generation is tcpdf http://www.tcpdf.org/
     * @see http://www.tcpdf.org/performances.php
     */
    public function export_detail_data_pdf($module, $module_id, $record_id)
    {
        $do_crmfields = new CRMFields();
        $do_block = new Block();
        $do_block->get_block_by_module($module_id);
        $module_obj = new $module();
        $module_obj->getId($record_id);
        if ($module_obj->getNumRows() > 0) {
            $do_crmfields = new CRMFields();
            include_once THIRD_PARTY_LIB_PATH . "/mpdf/mpdf.php";
            $pdf = new mPDF();
            $do_crm_entity = new CRMEntity();
            $entity_identity = $do_crm_entity->get_entity_identifier($record_id, $module, $module_obj);
            $html = '';
            $html .= '<div style="float:left"><h3>' . $entity_identity . '</h3></div><div style="clear:both;"></div>';
            while ($do_block->next()) {
                $html .= '
				<table cellspacing="0" cellpadding="1" border="1" width="800px;">
					<tbody>
						<tr style="background-color:#eeeeee;line-height:100%;">
							<td colspan="4" height="35"><b>' . $do_block->block_label . '</b></td>
						</tr>';
                $do_crmfields->get_form_fields_information($do_block->idblock, $module_id);
                $num_fields = $do_crmfields->getNumRows();
                $tot_count = 0;
                while ($do_crmfields->next()) {
                    $fieldobject = 'FieldType' . $do_crmfields->field_type;
                    $fields_count++;
                    $tot_count++;
                    if ($tot_count == 1 || $tot_count % 2 != 0) {
                        $html .= '<tr>';
                    }
                    $html .= '<td style="background-color:#FDFFBD;width:25%;" height="20">' . $do_crmfields->field_label . '</td>';
                    $fld_name = $do_crmfields->field_name;
                    $field_value = '';
                    if ($do_crmfields->field_type == 12) {
                        $field_value = $fieldobject::display_value($module_obj->{$fld_name}, 'l');
                    } elseif ($do_crmfields->field_type == 11) {
                        $field_value = $fieldobject::display_value($module_obj->{$fld_name}, $module, $sqcrm_record_id, $fld_name, true);
                    } else {
                        $field_value = $do_crmfields->display_field_value($module_obj->{$fld_name}, $do_crmfields->field_type, $fieldobject, $module_obj, $module_id, false);
                    }
                    $html .= '<td height="20" style="width:25%;">' . $field_value . '</td>';
                    if ($tot_count != 1 && $tot_count % 2 == 0) {
                        $html .= '</tr>';
                    }
                    if ($num_fields == $tot_count && $tot_count % 2 != 0) {
                        $html .= '
							<td style="background-color:#FDFFBD;width:25%" height="20">&nbsp;</td>
							<td height="20" style="width:25%">&nbsp;</td>
						</tr>';
                    }
                }
                $html .= '</tbody></table>';
                $html .= '<br>';
            }
            $pdf->WriteHTML($html);
            $pdf->Output($module . '_' . $record_id . '.pdf', 'D');
            exit;
        }
    }
Esempio n. 4
0
*/
$do_crm_fields = new CRMFields();
$do_combo_values = new ComboValues();
$non_editable_combo_fields = $do_combo_values->get_non_editable_combo_fields();
// modules which does not have the custom fields or any fields
$ignore_modules = array(1, 8, 9);
if (isset($_GET["cmid"]) && $_GET["cmid"] != '') {
    $cf_module = (int) $_GET["cmid"];
} else {
    $cf_module = 3;
}
$modules_info = $_SESSION["do_module"]->get_modules_with_full_info();
$do_crm_fields->get_pick_multiselect_fields($cf_module);
$data_array = array();
if ($do_crm_fields->getNumRows() > 0) {
    while ($do_crm_fields->next()) {
        $combo_data = array();
        if (in_array($do_crm_fields->idfields, $non_editable_combo_fields)) {
            continue;
        }
        $do_combo_values->get_combo_values($do_crm_fields->idfields);
        if ($do_combo_values->getNumRows() > 0) {
            $combo_data = array();
            while ($do_combo_values->next()) {
                $combo_data[] = $do_combo_values->combo_value;
            }
        }
        $data_array[$do_crm_fields->idfields]["field_label"] = $do_crm_fields->field_label;
        $data_array[$do_crm_fields->idfields]["combo_data"] = $combo_data;
    }
}
Esempio n. 5
0
         if (strlen($val) > 30) {
             $mapping_second_row[$key] = substr($val, 0, 30) . " ...";
         }
     }
 }
 if (is_array($mapping_third_row) && sizeof($mapping_third_row) > 0) {
     foreach ($mapping_third_row as $key => $val) {
         if (strlen($val) > 30) {
             $mapping_third_row[$key] = substr($val, 0, 30) . " ...";
         }
     }
 }
 $do_crmfields = new CRMFields();
 $do_crmfields->get_field_information_by_module($_SESSION["do_import"]->get_import_module_id());
 $module_fields = array();
 while ($do_crmfields->next()) {
     if ($do_crmfields->field_name == 'assigned_to') {
         continue;
     }
     if ($import_module_id == 4) {
         if ($do_crmfields->field_name == 'contact_avatar' || $do_crmfields->field_name == 'portal_user' || $do_crmfields->field_name == 'support_start_date' || $do_crmfields->field_name == 'support_end_date') {
             continue;
         }
     }
     if ($import_module_id == 5) {
         if ($do_crmfields->field_name == 'related_to') {
             $related_to_contact = $do_crmfields->field_label . ' (' . $_SESSION["do_module"]->modules_full_details[4]["name"] . ')';
             $related_to_org = $do_crmfields->field_label . ' (' . $_SESSION["do_module"]->modules_full_details[6]["name"] . ')';
             $data = array("field_name" => "pot_related_to_contact", "field_label" => $related_to_contact, "field_validation" => $do_crmfields->field_validation);
             $module_fields["pot_related_to_contact"] = $data;
             $data = array("field_name" => "pot_related_to_organization", "field_label" => $related_to_org, "field_validation" => $do_crmfields->field_validation);