Exemplo n.º 1
0
       	<!--<input type="submit" class="button" value=">" title="' . $AppUI->_('Search in name and description fields') . '"/>-->', '', '<form action="?m=projects&a=view&project_id=' . $project_id . '" method="post" id="searchfilter">', '</form>');
if ($canEditT) {
    $titleBlock->addCell();
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new task') . '">', '', '<form action="?m=tasks&a=addedit&task_project=' . $project_id . '" method="post">', '</form>');
}
if ($canEdit) {
    $titleBlock->addCell();
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new event') . '">', '', '<form action="?m=calendar&a=addedit&event_project=' . $project_id . '" method="post">', '</form>');
    $titleBlock->addCell();
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new file') . '">', '', '<form action="?m=files&a=addedit&project_id=' . $project_id . '" method="post">', '</form>');
}
$titleBlock->addCrumb("?m=projects", "projects list");
if ($canEdit) {
    $titleBlock->addCrumb("?m=projects&a=addedit&project_id={$project_id}", "edit this project");
    if ($canDelete) {
        $titleBlock->addCrumbDelete('delete project', $canDelete, $msg);
    }
    $titleBlock->addCrumb("?m=tasks&a=organize&project_id={$project_id}", "organize tasks");
}
$titleBlock->addCrumb("?m=projects&a=reports&project_id={$project_id}", "reports");
$titleBlock->show();
?>
<script language="javascript">
<?php 
// security improvement:
// some javascript functions may not appear on client side in case of user not having write permissions
// else users would be able to arbitrarily run 'bad' functions
if ($canEdit) {
    ?>
function delIt() {
	if (confirm( "<?php 
    $AppUI->savePlace();
}
// load the list of project statii and company types
$pstatus = dPgetSysVal('ProjectStatus');
$types = dPgetSysVal('CompanyType');
// setup the title block
$titleBlock = new CTitleBlock('View Company', 'handshake.png', $m, "{$m}.{$a}");
if ($canEdit) {
    $titleBlock->addCell();
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new company') . '" />', '', '<form action="?m=companies&a=addedit" method="post">', '</form>');
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new project') . '" />', '', '<form action="?m=projects&a=addedit&company_id=' . $company_id . '" method="post">', '</form>');
}
$titleBlock->addCrumb("?m=companies", "company list");
if ($canEdit) {
    $titleBlock->addCrumb("?m=companies&a=addedit&company_id={$company_id}", "edit this company");
    $titleBlock->addCrumbDelete('delete company', $canDelete, $msg);
}
$titleBlock->show();
?>


<table border="0" cellpadding="4" cellspacing="0" width="100%" class="std">

<?php 
if ($canDelete) {
    ?>
<form name="frmDelete" action="./index.php?m=companies" method="post">
	<input type="hidden" name="dosql" value="do_company_aed" />
	<input type="hidden" name="del" value="1" />
	<input type="hidden" name="company_id" value="<?php 
    echo $company_id;
Exemplo n.º 3
0
    $AppUI->redirect();
} else {
    if ($row->contact_private && $row->contact_owner != $AppUI->user_id && $row->contact_owner && $contact_id != 0) {
        $AppUI->redirect('m=public&a=access_denied');
    }
}
// setup the title block
$ttl = 'View Contact';
$titleBlock = new CTitleBlock($ttl, 'monkeychat-48.png', $m, "{$m}.{$a}");
$titleBlock->addCrumb('?m=contacts', 'contacts list');
if ($canEdit && $contact_id) {
    $titleBlock->addCrumb('?m=contacts&amp;a=addedit&amp;contact_id=' . $contact_id, 'edit');
}
$titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new project') . '" />', '', '<form action="?m=projects&amp;a=addedit&amp;company_id=' . $row->contact_company . '&amp;contact_id=' . $contact_id . '" method="post">', '</form>');
if ($canDelete && $contact_id) {
    $titleBlock->addCrumbDelete('delete contact', $canDelete, $msg);
}
$titleBlock->show();
?>
<form name="changecontact" action="?m=contacts" method="post">
        <input type="hidden" name="dosql" value="do_contact_aed" />
        <input type="hidden" name="del" value="0" />
        <input type="hidden" name="contact_id" value="<?php 
echo $contact_id;
?>
" />
        <input type="hidden" name="contact_owner" value="<?php 
echo $row->contact_owner ? $row->contact_owner : $AppUI->user_id;
?>
" />
</form>
Exemplo n.º 4
0
$tf = $AppUI->getPref('TIMEFORMAT');
$start_date = $obj->event_start_date ? new CDate($obj->event_start_date) : null;
$end_date = $obj->event_end_date ? new CDate($obj->event_end_date) : null;
$event_project = db_LoadResult('SELECT project_name FROM projects where project_id=' . $obj->event_project);
// setup the title block
$titleBlock = new CTitleBlock('View Event', 'myevo-appointments.png', $m, "{$m}.{$a}");
if ($canAuthor) {
    $titleBlock->addCell();
    $titleBlock->addCell('<form action="?m=calendar&amp;a=addedit" method="post">' . '<input type="submit" class="button" value="' . $AppUI->_('new event') . '" /></form>', '', '', '');
}
$titleBlock->addCrumb('?m=calendar&amp;date=' . $start_date->format(FMT_TIMESTAMP_DATE), 'month view');
$titleBlock->addCrumb('?m=calendar&amp;a=day_view&amp;date=' . $start_date->format(FMT_TIMESTAMP_DATE) . '&amp;tab=0', 'day view');
if ($canEdit) {
    $titleBlock->addCrumb('?m=calendar&amp;a=addedit&amp;event_id=' . $event_id, 'edit this event');
    if ($canDelete) {
        $titleBlock->addCrumbDelete('delete event', $canDelete, $msg);
    }
}
$titleBlock->show();
?>
<script language="javascript">
<?php 
// security improvement:
// some javascript functions may not appear on client side in case of user not having write permissions
// else users would be able to arbitrarily run 'bad' functions
if ($canDelete) {
    ?>
function delIt() {
	if (confirm("<?php 
    echo $AppUI->_('eventDelete', UI_OUTPUT_JS);
    ?>
Exemplo n.º 5
0
    // and task id
    $link->link_project = $project_id;
    $link->link_task = $task_id;
    if ($task_id) {
        $link_task = new CTask();
        $link_task->load($task_id);
        $link->task_name = $link_task->task_name;
    }
}
// setup the title block
$ttl = $link_id ? 'Edit Link' : 'Add Link';
$titleBlock = new CTitleBlock($AppUI->_($ttl), 'folder5.png', $m, $m . '.' . $a);
$titleBlock->addCrumb('?m=' . $m, 'links list');
$canDelete = $perms->checkModuleItem($m, 'delete', $link_id);
if ($canDelete && $link_id) {
    $titleBlock->addCrumbDelete('delete link', $canDelete, $msg);
}
$titleBlock->show();
$prj = new CProject();
$projects = $prj->getAllowedProjects($AppUI->user_id, false);
foreach ($projects as $project_id => $project_info) {
    $projects[$project_id] = $project_info['project_name'];
}
$projects = arrayMerge(array('0' => $AppUI->_('All', UI_OUTPUT_JS)), $projects);
?>
<script language="javascript" type="text/javascript">
function submitIt() {
	var f = document.uploadFrm;
	f.submit();
}
function delIt() {
Exemplo n.º 6
0
    $AppUI->setMsg('Resource');
    $AppUI->setMsg('invalidID', UI_MSG_ERROR, true);
    $AppUI->redirect();
} else {
    $AppUI->savePlace();
}
$titleBlock = new CTitleBlock('View Resource', 'helpdesk.png', $m, "{$m}.{$a}");
if ($canAuthor) {
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new resource') . '" />', '', '<form action="?m=resources&amp;a=addedit" method="post">', '</form>');
}
$titleBlock->addCrumb('?m=resources', 'resource list');
if ($canEdit) {
    $titleBlock->addCrumb("?m=resources&amp;a=addedit&amp;resource_id={$resource_id}", "edit this resource");
}
if ($canDelete) {
    $titleBlock->addCrumbDelete('delete resource', $canDelete, 'no delete permission');
}
$titleBlock->show();
if ($canDelete) {
    ?>
<script type="text/javascript" language="javascript">
	can_delete = true;
	delete_msg = "<?php 
    echo $AppUI->_('doDelete') . ' ' . $AppUI->_('Resource') . '?';
    ?>
";
</script>
<form name="frmDelete" action="?m=resources" method="post">
  <input type="hidden" name="dosql" value="do_resource_aed" />
  <input type="hidden" name="del" value="1" />
  <input type="hidden" name="resource_id" value="<?php 
Exemplo n.º 7
0
}
// setup the title block
$titleBlock = new CTitleBlock('View Company', 'handshake.png', $m, "{$m}.{$a}");
$titleBlock->addCell();
if ($canAdd) {
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new company') . '" />', '', '<form action="?m=companies&a=addedit" method="post" accept-charset="utf-8">', '</form>');
}
if ($canEdit) {
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new department') . '" />', '', '<form action="?m=departments&a=addedit&company_id=' . $company_id . '" method="post" accept-charset="utf-8">', '</form>');
    $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('new project') . '" />', '', '<form action="?m=projects&a=addedit&company_id=' . $company_id . '" method="post" accept-charset="utf-8">', '</form>');
}
$titleBlock->addCrumb('?m=companies', 'company list');
if ($canEdit) {
    $titleBlock->addCrumb('?m=companies&a=addedit&company_id=' . $company_id, 'edit this company');
    if ($canDelete && $deletable) {
        $titleBlock->addCrumbDelete('delete company', $deletable, $msg);
    }
}
$titleBlock->show();
// security improvement:
// some javascript functions may not appear on client side in case of user not having write permissions
// else users would be able to arbitrarily run 'bad' functions
if ($canDelete && $deletable) {
    ?>
  <script language="javascript" type="text/javascript">
    function delIt() {
    	if (confirm( '<?php 
    echo $AppUI->_('doDelete') . ' ' . $AppUI->_('Company') . '?';
    ?>
' )) {
    		document.frmDelete.submit();
Exemplo n.º 8
0
        echo $AppUI->_('Please choose a Department first!');
    } else {
        $company_id = $dept['dept_company'];
        if (!$min_view) {
            // setup the title block
            $titleBlock = new CTitleBlock('View Department', 'users.gif', $m, $m . '.' . $a);
            if ($canEdit) {
                $titleBlock->addCell();
                $titleBlock->addCell('<form action="?m=departments&amp;a=addedit&amp;company_id=' . $company_id . '&amp;dept_parent=' . $dept_id . '" method="post">' . '<input type="submit" class="button" value="' . $AppUI->_('new department') . '" />' . '</form>');
            }
            $titleBlock->addCrumb('?m=companies', 'company list');
            $titleBlock->addCrumb('?m=companies&a=view&company_id=' . $company_id, 'view this company');
            if ($canEdit) {
                $titleBlock->addCrumb('?m=departments&a=addedit&dept_id=' . $dept_id, 'edit this department');
                if ($canDelete) {
                    $titleBlock->addCrumbDelete('delete department', $canDelete, $msg);
                }
            }
            $titleBlock->show();
        }
        // format dates
        $df = $AppUI->getPref('SHDATEFORMAT');
        if (strlen($dept["dept_batching_maintenance"]) == 0) {
            $batching_expire_date = null;
        } else {
            $batching_expire_date = new CDate($dept["dept_batching_maintenance"]);
        }
        ?>
<script type="text/javascript" language="javascript">
<?php 
        // security improvement:
Exemplo n.º 9
0
        $q->addUpdate('history_item = history_id');
        $q->addWhere('history_table = \'history\'');
        $okMsg = 'History deleted';
    }
    $q->clear();
    $AppUI->redirect();
}
// pull the history
$q->addTable('history');
$q->addQuery('*');
$q->addWhere('history_id =' . $history_id);
$history = $q->loadHash();
$q->clear();
$titleBlock = new CTitleBlock($history_id ? 'Edit history' : 'New history', 'stock_book_blue_48.png', 'history', 'history.' . $a);
if ($canDelete) {
    $titleBlock->addCrumbDelete('delete history', $canDelete, $msg);
}
$titleBlock->show();
?>

<script language="javascript" type="text/javascript">
	function delIt() {
		document.AddEdit.action.value = 'del';
		document.AddEdit.submit();
	}

    function cancel() {
        if (confirm('<?php 
echo $AppUI->_('Are you sure you want to cancel?', UI_OUTPUT_JS);
?>
')) {
Exemplo n.º 10
0
if ($file->file_checkout != $AppUI->user_id) {
    $ci = false;
}
if (!$canAdmin) {
    $canAdmin = $file->canAdmin();
}
if ($file->file_checkout == 'final' && !$canAdmin) {
    $AppUI->redirect('m=public&a=access_denied');
}
// setup the title block
$ttl = $file_id ? 'Edit File' : 'Add File';
$ttl = $ci ? 'Checking in' : $ttl;
$titleBlock = new CTitleBlock($ttl, 'folder5.png', $m, $m . '.' . $a);
$titleBlock->addCrumb('?m=files', 'files list');
if ($canDelete && $file_id > 0 && !$ci) {
    $titleBlock->addCrumbDelete('delete file', $canDelete, $msg);
}
$titleBlock->show();
//Clear the file id if checking out so a new version is created.
if ($ci) {
    $file_id = 0;
}
if ($file->file_project) {
    $file_project = $file->file_project;
}
if ($file->file_task) {
    $file_task = $file->file_task;
    $task_name = $file->getTaskName();
} else {
    if ($file_task) {
        $task = new CTask();
Exemplo n.º 11
0
    if (!$canRead && !$canEdit) {
        $AppUI->redirect("m=public&a=access_denied");
    }
    $name = $hditem['item_requestor'];
    $assigned_to_name = $hditem["item_assigned_to"] ? $hditem["assigned_to_fullname"] : "";
    $assigned_email = $hditem["assigned_email"];
    $sql = "\n\tSELECT \n\t\thelpdesk_item_watchers.user_id, \n\t\tCONCAT(contact_first_name, ' ', contact_last_name) as name,\n\t\tcontact_email\n\tFROM \n\t\thelpdesk_item_watchers\n\t\tLEFT JOIN users ON helpdesk_item_watchers.user_id = users.user_id\n\t\tLEFT JOIN contacts ON user_contact = contact_id\n\tWHERE \n\t\titem_id = " . $item_id . "\n\tORDER BY contact_last_name, contact_first_name";
    $watchers = db_loadlist($sql);
    $titleBlock = new CTitleBlock('Viewing Help Desk Item', 'helpdesk.png', $m, 'ID_HELP_HELPDESK_IDX');
    if (hditemCreate()) {
        $titleBlock->addCell('<input type="submit" class="button" value="' . $AppUI->_('New Item') . '" />', '', '<form action="?m=helpdesk&a=addedit" method="post">', '</form>');
    }
    $titleBlock->addCrumb("?m=helpdesk", 'Home');
    $titleBlock->addCrumb("?m=helpdesk&a=list", 'List');
    if ($canEdit) {
        $titleBlock->addCrumbDelete('Delete this item', 1);
        $titleBlock->addCrumb("?m=helpdesk&a=addedit&item_id={$item_id}", 'Edit this item');
    }
    $titleBlock->show();
    ?>
  <script language="JavaScript">
  function delIt() {
    if (confirm( "<?php 
    print $AppUI->_('doDelete') . ' ' . $AppUI->_('Item') . '?';
    ?>
" )) {
      document.frmDelete.submit();
    }
  }

  function toggle_comment(id){
Exemplo n.º 12
0
}
if ($folder && !($canEdit_folder && $canRead_folder) || !$folder && !$canAuthor_folder) {
    $AppUI->redirect("m=public&a=access_denied");
}
$msg = '';
// check if this record has dependancies to prevent deletion
if ($folder > 0) {
    $canDelete_folder = $obj->canDelete($msg, $folder);
}
$folders = getFolderSelectList();
// setup the title block
$ttl = $folder ? "Edit File Folder" : "Add File Folder";
$titleBlock = new CTitleBlock($ttl, 'folder5.png', $m, $m . '.' . $a);
$titleBlock->addCrumb("?m=files", "files list");
if ($canDelete_folder) {
    $titleBlock->addCrumbDelete('delete file folder', $canDelete_folder, $msg);
}
$titleBlock->show();
?>
<script language="javascript">
function submitIt() {
	var f = document.folderFrm;
	var msg = '';
	if (f.file_folder_name.value.length < 1) {
		msg += "\n<?php 
echo $AppUI->_('Folder Name');
?>
";
		f.file_folder_name.focus();
	}
	if (msg.length > 0) {