• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_db_row函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_db_row函数的典型用法代码示例。如果您正苦于以下问题:PHP get_db_row函数的具体用法?PHP get_db_row怎么用?PHP get_db_row使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_db_row函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: get_download_type_icon

function get_download_type_icon($id_type)
{
    $type = get_db_row("tdownload_type", "id", $id_type);
    if ($type) {
        $image = print_image("images/download_type/" . $type["icon"], true, array('title' => safe_output($type["name"]), 'alt' => ''));
    } else {
        $image = print_image("images/download_type/default.png", true, array('title' => __('Without type'), 'alt' => ''));
    }
    return $image;
}
开发者ID:articaST,项目名称:integriaims,代码行数:10,代码来源:functions_file_releases.php


示例2: send_group_email

/**
 * Sends an email to a group.
 *
 * If the group doesn't have an email configured, the email is only sent
 * to the default user.
 *
 * @param int Group id.
 * @param string Email subject.
 * @param string Email body.
 */
function send_group_email($id_group, $subject, $body)
{
    $group = get_db_row("tgrupo", "id_grupo", $id_group);
    $name = $group['nombre'];
    $email = $group['email'];
    /* If the group has no email, use the email of the risponsable */
    if ($email == '') {
        $email = get_user_email($group['id_user_default']);
    }
    integria_sendmail($email, $subject, $body);
}
开发者ID:dsyman2,项目名称:integriaims,代码行数:21,代码来源:functions_groups.php


示例3: check_workunit_permission

function check_workunit_permission($id_workunit)
{
    global $config;
    // Delete workunit with ACL / Project manager check
    $workunit = get_db_row('tworkunit', 'id', $id_workunit);
    if ($workunit === false) {
        return false;
    }
    $id_user = $workunit["id_user"];
    $id_task = get_db_value("id_task", "tworkunit_task", "id_workunit", $workunit["id"]);
    $id_project = get_db_value("id_project", "ttask", "id", $id_task);
    if ($id_user != $config["id_user"] && !give_acl($config["id_user"], 0, "PM") && !project_manager_check($id_project)) {
        return false;
    }
    return true;
}
开发者ID:dsyman2,项目名称:integriaims,代码行数:16,代码来源:functions_workunits.php


示例4: send_group_email

/**
 * Sends an email to a group.
 *
 * If the group doesn't have an email configured, the email is only sent
 * to the default user.
 *
 * @param int Group id.
 * @param string Email subject.
 * @param string Email body.
 */
function send_group_email($id_group, $subject, $body)
{
    $group = get_db_row("tgrupo", "id_grupo", $id_group);
    $name = $group['nombre'];
    $emails_group = $group['email_group'];
    $emails_forced_email = $group['forced_email'];
    /* If the group has no email, use the email of the risponsable */
    $email = get_user_email($group['id_user_default']);
    integria_sendmail($email, $subject, $body, false, "", $group['email_from']);
    if ($emails_group == '') {
        $email_group = explode(',', $emails_group);
        foreach ($email_group as $k) {
            integria_sendmail($k, $subject, $body, false, "", $group['email_from']);
        }
    }
}
开发者ID:articaST,项目名称:integriaims,代码行数:26,代码来源:functions_groups.php


示例5: loadWithID

 public function loadWithID($id)
 {
     $result = false;
     if (!empty($id) && is_numeric($id)) {
         $fileRow = get_db_row(self::$dbTable, 'id_attachment', $id);
         if (!empty($fileRow)) {
             $this->id = $id;
             $this->description = (string) safe_output($fileRow['description']);
             $this->uploader = (string) safe_output($fileRow['id_usuario']);
             $this->created = !empty($fileRow['timestamp']) ? strtotime($fileRow['timestamp']) : false;
             $this->name = (string) safe_output($fileRow['filename']);
             $this->publicKey = (string) safe_output($fileRow['public_key']);
             // File info
             if (!empty($fileRow) && !empty($this->uploader)) {
                 $filename = (string) safe_output($fileRow['filename']);
                 if (!empty($filename)) {
                     $this->loadFileInfo(self::$fileSharingDir . "/" . $this->uploader . "/" . $this->id . "_" . $filename);
                 }
                 $result = true;
             }
         }
     }
     return $result;
 }
开发者ID:dsyman2,项目名称:integriaims,代码行数:24,代码来源:FileSharingFile.class.php


示例6: strtoupper

            break;
        case "details":
            echo strtoupper(__('Contact details'));
            break;
        case "incidents":
            echo strtoupper(__('Tickets'));
            break;
        case "inventory":
            echo strtoupper(__('Inventory'));
            break;
        default:
            echo strtoupper(__('Details'));
    }
    echo '</li>';
    echo '</ul>';
    $contact = get_db_row('tcompany_contact', 'id', $id);
    echo '<div class="under_tabs_info">' . sprintf(__('Contact: %s'), $contact['fullname']) . '</div>';
}
switch ($op) {
    case "incidents":
        include "contact_incidents.php";
        break;
    case "inventory":
        include "contact_inventory.php";
        break;
    case "details":
        include "contact_manage.php";
        break;
    case "files":
        include "contact_files.php";
        break;
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:contact_detail.php


示例7: include_once

include_once ("include/functions_graph.php");

check_login ();

$id_grupo = "";
$creacion_incidente = "";

$id = (int) get_parameter ('id');
$clean_output = get_parameter('clean_output');
if (! $id) {
	require ("general/noaccess.php");
	exit;
}

$incident = get_db_row ('tincidencia', 'id_incidencia', $id);

//user with IR and incident creator see the information
$check_acl = enterprise_hook("incidents_check_incident_acl", array($incident));
$standalone_check = enterprise_hook("manage_standalone", array($incident));

if (($check_acl !== ENTERPRISE_NOT_HOOK && !$check_acl) || ($standalone_check !== ENTERPRISE_NOT_HOOK && !$standalone_check)) {
	audit_db ($config['id_user'], $config["REMOTE_ADDR"], "ACL Violation","Trying to access to ticket #".$id);
	include ("general/noaccess.php");
	exit;
}

//Clean output we need to print incident title header :)
if ($clean_output) {
	echo '<h1 class="ticket_clean_report_title">'.__("Statistics")."</h1>";
}
开发者ID:articaST,项目名称:integriaims,代码行数:30,代码来源:incident_tracking.php


示例8: mb_convert_encoding

		if (!$standard_encoding){
			if($os_csv != "W"){
				echo mb_convert_encoding($line, 'UTF-16LE', 'UTF-8'). "\n";
			} else {
				echo $line . "\n";
			}
		}else{
			echo $line . "\n";
		}
	}
	exit;	

}

if ($render_html == 1){
	$report = get_db_row ('tinventory_reports', 'id', $id);
	if ($report === false)
		return;
	
	ini_set ("memory_limit", "3072M");
	ini_set ("max_execution_time", 600);
	
	echo "<h2>".__('Custom report')."</h2>";
	echo "<h4>".$report['name'];
		echo "<div id='button-bar-title'><ul>";
			echo "<li><a href='index.php?sec=projects&sec2=operation/inventories/inventory_reports'>".print_image ("images/flecha_volver.png", true, array("title" => __("Back to Report")))."</a></li>";
		echo "</ul></div>";
	echo "</h4>";

	$config['mysql_result_type'] = MYSQL_ASSOC;
	$rows = get_db_all_rows_sql (clean_output ($report['sql']));
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:inventory_reports_detail.php


示例9: mail_workorder

function mail_workorder($id_wo, $mode, $id_note = false, $wo_info = false, $note_info = false)
{
    global $config;
    $wo = $wo_info;
    if (!$wo_info) {
        $wo = get_db_row("ttodo", "id", $id_wo);
    }
    // Only send mails when creator is different than owner
    if ($wo['assigned_user'] == $wo['created_by_user']) {
        return;
    }
    $MACROS["_sitename_"] = $config['sitename'];
    $MACROS["_wo_id_"] = $wo['id'];
    $MACROS["_wo_name_"] = $wo['name'];
    $MACROS["_wo_last_update_"] = $wo['last_update'];
    $MACROS["_wo_created_by_user_"] = $wo['created_by_user'];
    $MACROS["_wo_assigned_user_"] = $wo['assigned_user'];
    $MACROS["_wo_progress_"] = translate_wo_status($wo['progress']);
    $MACROS["_wo_priority_"] = get_priority_name($wo['priority']);
    $MACROS["_wo_description_"] = wordwrap($wo["description"], 70, "\n");
    $MACROS["_wo_url_"] = $config["base_url"] . "/index.php?sec=projects&sec2=operation/workorders/wo&operation=view&id={$id_wo}";
    $MACROS["_wo_title_"] = $wo['name'];
    $MACROS["_wo_delete_user_"] = $config["id_user"];
    //Replace note macros if needed
    if ($id_note) {
        if (!$note_info) {
            $note_info = get_db_row('ttodo_notes', 'id', $id_note);
        }
        $MACROS["_wo_note_created_by_user_"] = $note_info["written_by"];
        $MACROS["_wo_notes_url_"] = $config["base_url"] . "/index.php?sec=projects&sec2=operation/workorders/wo&operation=view&tab=notes&id={$id_wo}";
        $MACROS["_wo_note_info_"] = $note_info["description"];
        $MACROS["_wo_note_delete_user_"] = $config["id_user"];
    }
    // Send email for assigned and creator of this workorder
    $email_creator = get_user_email($wo['created_by_user']);
    $email_assigned = get_user_email($wo['assigned_user']);
    switch ($mode) {
        case 0:
            // WO update
            $text = template_process($config["homedir"] . "/include/mailtemplates/wo_update.tpl", $MACROS);
            $subject = template_process($config["homedir"] . "/include/mailtemplates/wo_subject_update.tpl", $MACROS);
            break;
        case 1:
            // WO creation
            $text = template_process($config["homedir"] . "/include/mailtemplates/wo_create.tpl", $MACROS);
            $subject = template_process($config["homedir"] . "/include/mailtemplates/wo_subject_create.tpl", $MACROS);
            break;
        case 3:
            // WO deleted
            $text = template_process($config["homedir"] . "/include/mailtemplates/wo_delete.tpl", $MACROS);
            $subject = template_process($config["homedir"] . "/include/mailtemplates/wo_subject_delete.tpl", $MACROS);
            break;
        case 4:
            //New note
            $text = template_process($config["homedir"] . "/include/mailtemplates/wo_new_note.tpl", $MACROS);
            $subject = template_process($config["homedir"] . "/include/mailtemplates/wo_subject_new_note.tpl", $MACROS);
            break;
        case 5:
            //Delete note
            $text = template_process($config["homedir"] . "/include/mailtemplates/wo_delete_note.tpl", $MACROS);
            $subject = template_process($config["homedir"] . "/include/mailtemplates/wo_subject_delete_note.tpl", $MACROS);
            break;
    }
    $msg_code = "WO#{$id_wo}";
    $msg_code .= "/" . substr(md5($id_wo . $config["smtp_pass"] . $wo["assigned_user"]), 0, 5);
    $msg_code .= "/" . $wo["assigned_user"];
    integria_sendmail($email_assigned, $subject, $text, false, $msg_code);
    $msg_code = "WO#{$id_wo}";
    $msg_code .= "/" . substr(md5($id_wo . $config["smtp_pass"] . $wo["created_by_user"]), 0, 5);
    $msg_code .= "/" . $wo["created_by_user"];
    integria_sendmail($email_creator, $subject, $text, false, $msg_code);
}
开发者ID:dsyman2,项目名称:integriaims,代码行数:72,代码来源:functions_workorders.php


示例10: task_activity_graph

function task_activity_graph($id_task, $width = 900, $height = 230, $area = false, $return = false)
{
    global $config;
    $task = get_db_row("ttask", "id", $id_task);
    $output = "";
    $start_unixdate = strtotime($task["start"]);
    $end_unixdate = strtotime("now");
    $period = $end_unixdate - $start_unixdate;
    $resolution = 50;
    $interval = (int) ($period / $resolution);
    if (!$area) {
        $output .= __("Each bar is") . " " . human_time_description_raw($interval);
        $output .= "<br>";
    }
    $data = get_db_all_rows_sql("SELECT tworkunit.duration as duration, \n            tworkunit.timestamp as timestamp  FROM tworkunit, tworkunit_task, ttask \n\t\t\tWHERE tworkunit_task.id_task = {$id_task}\n\t\t\tAND tworkunit_task.id_workunit = tworkunit.id GROUP BY tworkunit.id  ORDER BY timestamp ASC");
    if ($data === false) {
        $data = array();
    }
    $min_necessary = 1;
    // Check available data
    if (count($data) < $min_necessary) {
        return;
    }
    // Set initial conditions
    $chart = array();
    $names = array();
    $chart2 = array();
    // Calculate chart data
    for ($i = 0; $i < $resolution; $i++) {
        $timestamp = $start_unixdate + $interval * $i;
        $total = 0;
        $j = 0;
        while (isset($data[$j])) {
            $dftime = strtotime($data[$j]['timestamp']);
            if ($dftime >= $timestamp && $dftime < $timestamp + $interval) {
                $total += $data[$j]['duration'];
            }
            $j++;
        }
        $time_format = "M d";
        $timestamp_human = clean_flash_string(date($time_format, $timestamp));
        $chart2[$timestamp_human] = $total;
    }
    $colors['1day']['color'] = "#2179B1";
    $colors['1day']['border'] = "#000";
    $colors['1day']['alpha'] = 100;
    foreach ($chart2 as $key => $ch) {
        $chart3[$key]['1day'] = $ch;
    }
    $legend = array();
    $xaxisname = __('Days');
    $yaxisname = __('Hours');
    if ($area) {
        $output .= area_graph($config['flash_charts'], $chart3, $width, $height, $colors, $legend, '', '', '', $yaxisname, '', '', $config['font'], $config['fontsize']);
    } else {
        $output .= vbar_graph($config['flash_charts'], $chart3, $width, $height, $colors, $legend, $xaxisname, $yaxisname, "", "", $config['font'], $config['fontsize']);
    }
    if ($return) {
        return $output;
    } else {
        echo $output;
    }
}
开发者ID:dsyman2,项目名称:integriaims,代码行数:63,代码来源:functions_graph.php


示例11: check_login

check_login ();

if (!isset($read_permission)) {
	$read_permission = check_crm_acl ('lead', 'cr', $config['id_user'], $id);
	if (!$read_permission) {
		audit_db ($config["id_user"], $config["REMOTE_ADDR"], "ACL Violation", "Trying to access to a lead");
		include ("general/noaccess.php");
		exit;
	}
}

// Delete file

$deletef = get_parameter ("deletef", "");
if ($deletef != ""){
	$file = get_db_row ("tattachment", "id_attachment", $deletef);
	if ( (dame_admin($config["id_user"])) || ($file["id_usuario"] == $config["id_user"]) ){
		$sql = "DELETE FROM tattachment WHERE id_attachment = $deletef";
		process_sql ($sql);	
		$filename = $config["homedir"]."/attachment/". $file["id_attachment"]. "_" . $file["filename"];
		unlink ($filename);
		echo ui_print_success_message (__("Successfully deleted"), '', true, 'h3', true);

	}
}

// Upload file
if (isset($_GET["upload"])) {
	
	if (isset($_POST['upfile']) && ( $_POST['upfile'] != "" )){ //if file
		$filename= $_POST['upfile'];
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:lead_files.php


示例12: ui_print_error_message

	if (! $result)
		echo ui_print_error_message (__('Could not be deleted'), '', true, 'h3', true);
	else {
		echo ui_print_success_message (__('Successfully deleted'), '', true, 'h3', true);
	}
}

// CREATE form
if ((isset($_GET["create"]) OR (isset($_GET["update"])))) {
	if (isset($_GET["create"])){
		$id_group = 0;
		$name = "";
		$id = -1;
	} else {
		$id = get_parameter ("update",-1);
		$row = get_db_row ("tdownload_category", "id", $id);
		$name = $row["name"];
		$icon = $row["icon"];
		$id_group = $row["id_group"];

	}
	
	echo "<h2>".__('File release category access management')."</h2>";
	echo "<h4>".__('Create a new category access')."</h4>";
	echo "<form name=catman method='post' action='index.php?sec=download&
						sec2=operation/download/manage_perms&create2'>";
	
	
	echo '<table width="100%" class="search-table-button">';
	echo "<tr>";
	echo "<td class=datos>";
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:manage_perms.php


示例13: print_mysql_timestamp

	$now = print_mysql_timestamp();

	$res = workorders_insert_note ($id, $config["id_user"], $note, $now);
	
	if (! $res)
		echo '<h3 class="error">'.__('There was a problem creating the note').'</h3>';
	else
		echo '<h3 class="suc">'.__('Note was added successfully').'</h3>'; 

}

if ($delete) {
	$id_note = get_parameter("id_note");

	$note = get_db_row ("ttodo_notes", "id", $id_note); 

	$sql = sprintf("DELETE FROM ttodo_notes WHERE id = %d", $id_note);

	$res = process_sql($sql);

	if (! $res)
                echo '<h3 class="error">'.__('There was a problem deleting the note').'</h3>';
        else
                echo '<h3 class="suc">'.__('Note was deleted successfully').'</h3>';
	
	mail_workorder ($id, 5, $res, false, $note);
}

$table = new StdClass();
$table->width = '100%';
开发者ID:articaST,项目名称:integriaims,代码行数:30,代码来源:wo_notes.php


示例14: get_db_row

     $i++;
     continue;
 }
 $i++;
 $row0 = get_db_row("tusuario", "id_usuario", $key);
 if ($row0) {
     $nombre = $row0["id_usuario"];
     $avatar = $row0["avatar"];
     // Get total hours for this month
     $sql = "SELECT SUM(duration) FROM tworkunit WHERE timestamp > '{$begin_month}' AND timestamp < '{$end_month}' AND id_user = '{$nombre}'";
     if ($res = mysql_query($sql)) {
         $row = mysql_fetch_array($res);
     }
     echo "<tr><td>";
     echo "<a href='index.php?sec=users&sec2=operation/users/user_edit&id={$nombre}' class='tip'>&nbsp;<span>";
     $usuario = get_db_row("tusuario", "id_usuario", $nombre);
     echo "<b>" . $usuario["nombre_real"] . "</b><br>";
     echo "<i>" . $usuario["comentarios"] . "</i><br>";
     // TODO - Move this to enterprise code.
     if ($config["enteprise"] == 1) {
         echo "<font size=1px>";
         $sql1 = 'SELECT * FROM tusuario_perfil WHERE id_usuario = "' . $nombre . '"';
         $result1 = mysql_query($sql1);
         if (mysql_num_rows($result1)) {
             while ($row1 = mysql_fetch_array($result1)) {
                 echo dame_perfil($row1["id_perfil"]) . "/ ";
                 echo dame_grupo($row1["id_grupo"]) . "<br>";
             }
         } else {
             echo __('This user doesn\'t have any assigned profile/group');
         }
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:report_monthly.php


示例15: get_parameter

$name = "";
$icon = "";
$id_user_default = "";
$id_user = "";
$banner = "";
$parent = "";
$forced_email = true;
$soft_limit = 5;
$hard_limit = 20;
$enforce_soft_limit = 1;
$id_sla = 0;
$email_from = '';
$email_group = '';
$creacion_grupo = (bool) get_parameter('creacion_grupo');
if ($id) {
    $group = get_db_row('tgrupo', 'id_grupo', $id);
    if ($group) {
        $name = $group['nombre'];
        $icon = $group['icon'];
        $id_user_default = $group['id_user_default'];
        $banner = $group['banner'];
        $parent = $group['parent'];
        $soft_limit = $group["soft_limit"];
        $hard_limit = $group["hard_limit"];
        $enforce_soft_limit = (bool) $group["enforce_soft_limit"];
        $forced_email = (bool) $group['forced_email'];
        $id_sla = $group["id_sla"];
        $id_user = get_db_value('id_user_default', 'tgrupo', 'id_grupo', $id);
        $id_inventory = $group["id_inventory_default"];
        $inventory_name = get_inventory_name($group["id_inventory_default"]);
        $autocreate_user = $group["autocreate_user"];
开发者ID:keunes,项目名称:integriaims,代码行数:31,代码来源:configurar_grupo.php


示例16: get_db_row

	if ($new_sla) {
		$name = "";
		$description = "";
		$min_response = 48.0;
		$max_response = 480.0;
		$max_incidents = 10;
		$max_inactivity = 96.0;
		$id_sla_base = 0;
		$enforced = 1;
        $five_daysonly = 1;
        $time_from = 8;
        $time_to = 18;
		$no_holidays = 1;
		$id_sla_type = 0;
	} else {
		$sla = get_db_row ('tsla', 'id', $id);
		$name = $sla['name'];
		$description = $sla['description'];
		$min_response = $sla['min_response'];
		$max_response = $sla['max_response'];
		$max_incidents = $sla['max_incidents'];
		$max_inactivity = $sla['max_inactivity'];
		$id_sla_base = $sla['id_sla_base'];
		$enforced = $sla['enforced'];
        $five_daysonly = $sla["five_daysonly"];
        $time_from = $sla["time_from"];
        $time_to = $sla["time_to"];
        $no_holidays = $sla["no_holidays"];
        $id_sla_type = $sla["id_sla_type"];

	}
开发者ID:articaST,项目名称:integriaims,代码行数:31,代码来源:sla_detail.php


示例17: get_db_value

    $name = get_db_value('name', 'tbuilding', 'id', $id);
    $sql = sprintf('DELETE FROM tbuilding WHERE id = %d', $id);
    process_sql($sql);
    audit_db($config["id_user"], $config["REMOTE_ADDR"], "Building", "Deleted building {$id} - {$name}");
    echo '<h3 class="suc">' . __('Successfully deleted') . '</h3>';
    $id = 0;
}
echo '<h2>' . __('Building management') . '</h2>';
// FORM (Update / Create)
if ($id || $new_building) {
    if ($new_building) {
        $id = 0;
        $name = "";
        $description = "";
    } else {
        $building = get_db_row('tbuilding', 'id', $id);
        $name = $building['name'];
        $description = $building['description'];
    }
    $table->width = "90%";
    $table->class = "databox";
    $table->data = array();
    $table->colspan = array();
    $table->colspan[1][0] = 2;
    $table->data[0][0] = print_input_text('name', $name, '', 60, 100, true, __('Building name'));
    $table->data[1][0] = print_textarea('description', 14, 1, $description, '', true, __('Description'));
    echo '<form method="post" action="index.php?sec=inventory&sec2=operation/buildings/building_detail">';
    print_table($table);
    echo '<div class="button" style="width: ' . $table->width . '">';
    if ($id) {
        print_submit_button(__('Update'), 'update_btn', false, 'class="sub upd"', false);
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:building_detail.php


示例18: get_db_row

    }
    $operation = "";
}
// ---------------
// CREATE  (form)
// ---------------
if ($operation == "create" || $operation == "edit") {
    if ($operation == "create") {
        $name = "";
        $description = "";
        $id_language = "";
        $id_company = 0;
        $subject = "";
    } else {
        // TODO: Check ACL here. Dont allow to read Id not my company or child (or admin)
        $template = get_db_row("tcrm_template", "id", $id);
        $name = $template["name"];
        $description = $template["description"];
        $id_language = $template["id_language"];
        $id_company = $template["id_company"];
        $subject = $template["subject"];
    }
    $table->width = '99%';
    $table->class = 'search-table-button';
    $table->colspan = array();
    $table->colspan[3][0] = 2;
    $table->data = array();
    $table->data[1][0] = print_input_text('name', $name, '', 50, 100, true, __('Name'));
    $table->data[1][1] = print_select_from_sql('SELECT id_language, name FROM tlanguage ORDER BY name', 'id_language', $id_language, '', '', '', true, false, false, __('Language'));
    $sql2 = "SELECT id, name FROM tcompany ORDER by name";
    $table->data[2][0] = print_input_text('subject', $subject, '', 70, 200, true, __('Subject'));
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:template_manager.php


示例19: show

 public function show()
 {
     if ($this->permission) {
         $system = System::getInstance();
         $message = "";
         switch ($this->operation) {
             case 'insert':
                 $result = $this->insertWorkOrder($system->getConfig('id_user'), $this->assigned_user, $this->title, $this->priority, $this->status, $this->category, $this->id_task, $this->description);
                 if ($result) {
                     $this->id_workorder = $result;
                     $message = "<h2 class='suc'>" . __('Successfully created') . "</h2>";
                 } else {
                     $message = "<h2 class='error'>" . __('An error ocurred while creating the workorder') . "</h2>";
                 }
                 break;
             case 'update':
                 $result = $this->updateWorkOrder($this->id_workorder, $this->assigned_user, $this->title, $this->priority, $this->status, $this->category, $this->id_task, $this->description);
                 if ($result) {
                     $message = "<h2 class='suc'>" . __('Successfully updated') . "</h2>";
                 } else {
                     $message = "<h2 class='error'>" . __('An error ocurred while updating the workorder') . "</h2>";
                 }
                 break;
             case 'delete':
                 $result = $this->deleteWorkOrder($this->id_workorder);
                 if ($result) {
                     $this->id_workorder = -1;
                     $message = "<h2 class='suc'>" . __('Successfully deleted') . "</h2>";
                 } else {
                     $message = "<h2 class='error'>" . __('An error ocurred while deleting the workorder') . "</h2>";
                 }
                 break;
             case 'view':
                 $workorder = get_db_row("ttodo", "id", $this->id_workorder);
                 $this->setValues($this->id_workorder, $workorder['name'], $workorder['assigned_user'], $workorder['priority'], $workorder['progress'], $workorder['id_wo_category'], $workorder['id_task'], $workorder['description'], 'view');
                 break;
             default:
                 if ($this->id_workorder > 0) {
                     $workorder = get_db_row("ttodo", "id", $this->id_workorder);
                     $this->setValues($this->id_workorder, $workorder['name'], $workorder['assigned_user'], $workorder['priority'], $workorder['progress'], $workorder['id_wo_category'], $workorder['id_task'], $workorder['description'], 'view');
                 }
         }
         $this->showWorkOrder($message);
     } else {
         $this->showNoPermission();
     }
 }
开发者ID:dsyman2,项目名称:integriaims,代码行数:47,代码来源:workorder.php


示例20: api_download_file

function api_download_file($return_type, $user, $id_file)
{
    global $config;
    $data = get_db_row("tattachment", "id_attachment", $id_file);
    if (!check_user_incident($user, $data['id_incidencia'])) {
        return;
    }
    $fileLocation = $config["homedir"] . "/attachment/" . $data["id_attachment"] . "_" . $data["filename"];
    switch ($return_type) {
        case "xml":
            echo xml_node(base64_encode(file_get_contents($fileLocation)));
            break;
        case "csv":
            echo base64_encode(file_get_contents($fileLocation));
            break;
    }
}
开发者ID:keunes,项目名称:integriaims,代码行数:17,代码来源:functions_api.php



注:本文中的get_db_row函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_db_row_sql函数代码示例发布时间:2022-05-15
下一篇:
PHP get_db_link函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap