当前位置: 首页>>代码示例>>PHP>>正文


PHP plugin_table函数代码示例

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


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

示例1: schema

 public function schema()
 {
     return [['CreateTableSQL', [plugin_table('tasks'), 'id I UNSIGNED PRIMARY NOTNULL AUTOINCREMENT,
             bug_id I UNSIGNED NOTNULL DEFAULT \'0\',
             description C(120) NOTNULL DEFAULT \'\',
             finished L DEFAULT 0', ['mysql' => 'ENGINE=MyISAM DEFAULT CHARSET=utf8', 'pgsql' => 'WITHOUT OIDS']]], ['CreateIndexSQL', ['idx_tasks_bug_id', plugin_table('tasks'), 'bug_id']]];
 }
开发者ID:andrzejkupczyk,项目名称:mantisbt-todolists,代码行数:7,代码来源:ToDoLists.php

示例2: get_mantis_plugin_table

 /**
  * @param $table
  * @return string
  */
 private function get_mantis_plugin_table($table)
 {
     if ($this->get_mantis_version() == '1.2.') {
         $mantis_plugin_table = plugin_table($table, 'SpecManagement');
     } else {
         $mantis_plugin_table = db_get_table('plugin_SpecManagement_' . $table);
     }
     return $mantis_plugin_table;
 }
开发者ID:Cre-ator,项目名称:Whiteboard.SpecificationManagement-Plugin,代码行数:13,代码来源:specmanagement_database_api.php

示例3: loadRelation

 /**
  * @author Lennard Bredenkamp, BFE
  * NOT USED AT THE MOMENT (loadRelations is used to load multiple relations instead)
  * get single tts_relation object from DB
  * @param $p_bug_id
  * @param $tts_exec_id
  * @return TTSrelation object
  */
 static function loadRelation($p_bug_id, $tts_exec_id)
 {
     $t_project_table = plugin_table('project', 'TTSintegr');
     $its_id = $p_bug_id;
     $t_query = "SELECT * FROM {$t_project_table} WHERE its_id=" . db_param() . " AND tts_exec_id=" . db_param();
     $t_result = db_query_bound($t_query, array($its_id, $tts_exec_id));
     $t_row = db_fetch_array($t_result);
     $t_relation = new TTSrelation($t_row['its_id'], $t_row['tts_exec_id'], $t_row['tts_tproject_id']);
     return $t_relation;
 }
开发者ID:bfekomsthoeft,项目名称:TTS_Praxisprojekt1,代码行数:18,代码来源:TTSintegr.API.php

示例4: get_project_package_list

/**
 * Created by PhpStorm.
 * User: wb-liuyuguang
 * Date: 14-7-31
 * Time: 下午1:30
 */
function get_project_package_list($p_package_id)
{
    $t_acra_prj_table = plugin_table("project");
    $query = "SELECT * FROM {$t_acra_prj_table} WHERE `project_id` = {$p_package_id} LIMIT 0, 1";
    $result = db_query_bound($query);
    $result = db_fetch_array($result);
    if ($result === false) {
        return;
    }
    $packages = $result['packages'];
    return handle_project_package_list($packages);
}
开发者ID:since2014,项目名称:MantisAcra,代码行数:18,代码来源:ProjectAcraExt.php

示例5: schema

 function schema()
 {
     require_once __DIR__ . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'wmApi.php';
     $tableArray = array();
     $whiteboardMenuTable = array('CreateTableSQL', array(plugin_table('menu', 'whiteboard'), "\n            id                   I       NOTNULL UNSIGNED AUTOINCREMENT PRIMARY,\n            plugin_name          C(250)  DEFAULT '',\n            plugin_access_level  I       UNSIGNED,\n            plugin_show_menu     I       UNSIGNED,\n            plugin_menu_path     C(250)  DEFAULT ''\n            "));
     $boolArray = wmApi::checkWhiteboardTablesExist();
     # add whiteboardmenu table if it does not exist
     if (!$boolArray[0]) {
         array_push($tableArray, $whiteboardMenuTable);
     }
     return $tableArray;
 }
开发者ID:Cre-ator,项目名称:Whiteboard.Menu-Plugin,代码行数:12,代码来源:WhiteboardMenu.php

示例6: getAcraIssueList

function getAcraIssueList()
{
    $t_acra_issue_table = plugin_table("issue");
    $query = "SELECT * FROM {$t_acra_issue_table} WHERE `custom_data` REGEXP 'url'  ORDER BY `id` DESC";
    $result = db_query_bound($query);
    $list = array();
    while (true) {
        $row = db_fetch_array($result);
        if ($row === false) {
            break;
        }
        $list[] = $row;
    }
    return $list;
}
开发者ID:since2014,项目名称:MantisAcra,代码行数:15,代码来源:checkhttp.php

示例7: getAcraIssueList

function getAcraIssueList($page_num, $total_count)
{
    global $acra_id;
    $acra_id = $_GET['acra_hash'];
    $t_acra_issue_table = plugin_table("issue");
    $where = getFilterQueryString();
    $query = "SELECT * FROM {$t_acra_issue_table} WHERE `report_fingerprint`='" . $acra_id . "'" . $where . buildOrderString() . buildPageQueryString($page_num, $total_count);
    $result = db_query_bound($query);
    $list = array();
    while (true) {
        $row = db_fetch_array($result);
        if ($row === false) {
            break;
        }
        $list[] = $row;
    }
    return $list;
}
开发者ID:since2014,项目名称:MantisAcra,代码行数:18,代码来源:test.php

示例8: create

 public function create()
 {
     $t_issue_ext_table = plugin_table("issue");
     # Insert the rest of the data
     $query = "INSERT INTO {$t_issue_ext_table}\n\t\t\t\t\t    ( project_id ,              issue_id,       report_id,   report_fingerprint,\n                        file_path,               phone_model,    phone_build, phone_brand,\n                        product_name,            total_mem_size, available_mem_size, custom_data,\n                        initial_configuration,   crash_configuration, display, user_comment,\n                        dumpsys_meminfo,         dropbox,        eventslog,    radiolog,\n                        is_silent,               device_id,      installation_id,  user_email,\n                        device_features,         environment,    settings_system, settings_secure,\n                        shared_preferences,      android_version,app_version,     crash_date,\n                        report_date,             install_date\n\t\t\t\t\t    )\n\t\t\t\t\t  VALUES\n\t\t\t\t\t    ( " . db_param() . ',' . db_param() . ',' . db_param() . ',' . db_param() . ",\n\t\t\t\t\t      " . db_param() . ',' . db_param() . ',' . db_param() . ',' . db_param() . ",\n\t\t\t\t\t      " . db_param() . ',' . db_param() . ',' . db_param() . ',' . db_param() . ",\n\t\t\t\t\t      " . db_param() . ',' . db_param() . ',' . db_param() . ',' . db_param() . ",\n\t\t\t\t\t      " . db_param() . ',' . db_param() . ',' . db_param() . ',' . db_param() . ",\n\t\t\t\t\t      " . db_param() . ',' . db_param() . ',' . db_param() . ',' . db_param() . ",\n\t\t\t\t\t      " . db_param() . ',' . db_param() . ',' . db_param() . ',' . db_param() . ",\n\t\t\t\t\t      " . db_param() . ',' . db_param() . ',' . db_param() . ',' . db_param() . ",\n\t\t\t\t\t      " . 'now()' . ',' . db_param() . ')';
     $t_display_errors = config_get_global('display_errors');
     $t_on_error_handler = $t_display_errors[E_USER_ERROR];
     $t_display_errors[E_USER_ERROR] = "none";
     config_set_global('display_errors', $t_display_errors);
     $t_result = db_query_bound($query, array($this->project_id, $this->issue_id, $this->report_id, $this->report_fingerprint, $this->file_path, $this->phone_model, $this->phone_build, $this->phone_brand, $this->product_name, $this->total_mem_size, $this->available_mem_size, $this->custom_data, $this->initial_configuration, $this->crash_configuration, $this->display, $this->user_comment, $this->dumpsys_meminfo, $this->dropbox, $this->eventslog, $this->radiolog, $this->is_silent, $this->device_id, $this->installation_id, $this->user_email, $this->device_features, $this->environment, $this->settings_system, $this->settings_secure, $this->shared_preferences, $this->android_version, $this->app_version, $this->crash_date . $this->report_date, $this->install_date));
     $t_display_errors[E_USER_ERROR] = $t_on_error_handler;
     config_set_global('display_errors', $t_display_errors);
     if ($t_result === false) {
         return false;
     }
     $this->id = db_insert_id($t_issue_ext_table);
     return true;
 }
开发者ID:since2014,项目名称:MantisAcra,代码行数:18,代码来源:BugDataAcraExt.php

示例9: check_user_from_projects_table

/**
 * Check user from projects table.
 */
function check_user_from_projects_table($bug_id)
{
    $user_id = bug_get_field($bug_id, 'reporter_id');
    $proj_id = bug_get_field($bug_id, 'project_id');
    $user_proj_table = plugin_table('user_proj', 'JabberNotifierSystem');
    $query = "SELECT proj_id FROM {$user_proj_table} WHERE user_id = {$user_id} LIMIT 1;";
    $res = db_query($query);
    if (db_num_rows($res) != 0) {
        $row = db_fetch_array($res);
        $arr = explode(',', $row['proj_id']);
        if (in_array($proj_id, $arr)) {
            return true;
        } else {
            return false;
        }
    }
    return true;
}
开发者ID:JeromyK,项目名称:jabber-notify,代码行数:21,代码来源:JabberNotifierSystem_API.php

示例10: plugin_TimeTracking_stats_get_project_array

/**
* Returns an array of time tracking stats
* @param int $p_project_id project id
* @param string $p_from Starting date (yyyy-mm-dd) inclusive, if blank, then ignored.
* @param string $p_to Ending date (yyyy-mm-dd) inclusive, if blank, then ignored.
* @return array array of bugnote stats
* @access public
*/
function plugin_TimeTracking_stats_get_project_array($p_project_id, $p_from, $p_to)
{
    $c_project_id = db_prepare_int($p_project_id);
    $c_to = "'" . date("Y-m-d", strtotime("{$p_to}") + SECONDS_PER_DAY - 1) . "'";
    $c_from = "'" . $p_from . "'";
    //strtotime( $p_from )
    if ($c_to === false || $c_from === false) {
        error_parameters(array($p_form, $p_to));
        trigger_error(ERROR_GENERIC, ERROR);
    }
    $t_timereport_table = plugin_table('data', 'TimeTracking');
    $t_bug_table = db_get_table('mantis_bug_table');
    $t_user_table = db_get_table('mantis_user_table');
    $t_project_table = db_get_table('mantis_project_table');
    if (!is_blank($c_from)) {
        $t_from_where = " AND expenditure_date >= {$c_from}";
    } else {
        $t_from_where = '';
    }
    if (!is_blank($c_to)) {
        $t_to_where = " AND expenditure_date <= {$c_to}";
    } else {
        $t_to_where = '';
    }
    if (ALL_PROJECTS != $c_project_id) {
        $t_project_where = " AND b.project_id = '{$c_project_id}'  ";
    } else {
        $t_project_where = '';
    }
    if (!access_has_global_level(plugin_config_get('view_others_threshold'))) {
        $t_user_id = auth_get_current_user_id();
        $t_user_where = " AND user = '{$t_user_id}'  ";
    } else {
        $t_user_where = '';
    }
    $t_results = array();
    $query = "SELECT u.username, p.name as project_name, bug_id, expenditure_date, hours, timestamp, info \nFROM {$t_timereport_table} tr, {$t_bug_table} b, {$t_user_table} u, {$t_project_table} p\nWHERE tr.bug_id=b.id and tr.user=u.id AND p.id = b.project_id\n{$t_project_where} {$t_from_where} {$t_to_where} {$t_user_where}\nORDER BY user, expenditure_date, bug_id";
    $result = db_query($query);
    while ($row = db_fetch_array($result)) {
        $t_results[] = $row;
    }
    return $t_results;
}
开发者ID:Hacho25,项目名称:timetracking,代码行数:51,代码来源:timetracking_api.php

示例11: getList

function getList($where, $what)
{
    if (strlen($where) > 0) {
        $where = "WHERE `report_fingerprint`='" . $_GET['acra_hash'] . "' AND " . $where;
    } else {
        $where = "WHERE `report_fingerprint`='" . $_GET['acra_hash'] . "'";
    }
    $t_acra_issue_table = plugin_table("issue");
    $query = "SELECT `{$what}` FROM {$t_acra_issue_table} {$where} GROUP BY  `{$what}`";
    $result = db_query_bound($query);
    $list = array();
    while (true) {
        $row = db_fetch_array($result);
        if ($row === false) {
            break;
        }
        $list[] = $row[$what];
    }
    return $list;
}
开发者ID:since2014,项目名称:MantisAcra,代码行数:20,代码来源:acra_filter_api.php

示例12: cache

 public function cache($p_bugs)
 {
     if (count($p_bugs) < 1) {
         return;
     }
     $t_bug_table = plugin_table('bug', 'Source');
     $t_bug_ids = array();
     foreach ($p_bugs as $t_bug) {
         $t_bug_ids[] = $t_bug->id;
     }
     $t_bug_ids = implode(',', $t_bug_ids);
     $t_query = "SELECT * FROM {$t_bug_table} WHERE bug_id IN ( {$t_bug_ids} )";
     $t_result = db_query_bound($t_query);
     while ($t_row = db_fetch_array($t_result)) {
         if (isset($this->changeset_cache[$t_row['bug_id']])) {
             $this->changeset_cache[$t_row['bug_id']]++;
         } else {
             $this->changeset_cache[$t_row['bug_id']] = 1;
         }
     }
 }
开发者ID:Sansumaki,项目名称:source-integration,代码行数:21,代码来源:RelatedChangesetsColumn.class.php

示例13: print_users_in_group_option_list

function print_users_in_group_option_list($usergroup_id)
{
    if (plugin_config_get('assign_to_groups', '') == 1 && plugin_config_get('assign_group_threshold', '') <= user_get_access_level(auth_get_current_user_id())) {
        $show_groups = 1;
    } else {
        $show_groups = 0;
    }
    $t_table_users = plugin_table('users');
    $t_user_table = db_get_table('mantis_user_table');
    $query = "SELECT * FROM (";
    $query .= "    SELECT u.id, u.username, u.realname, ug.group_user_id";
    $query .= "    FROM {$t_user_table} AS u";
    $query .= "        LEFT JOIN {$t_table_users} AS ug ON (u.id=ug.user)";
    //if( plugin_config_get('assign_to_groups', '') == 0  || plugin_config_get('assign_group_threshold','') > user_get_access_level( auth_get_current_user_id() ) )
    if ($show_groups == 0) {
        $query .= "    WHERE u.username NOT LIKE " . db_param();
    }
    $query .= ") AS t1 WHERE group_user_id=" . db_param() . " OR group_user_id IS NULL ORDER BY username ASC";
    if ($show_groups == 0) {
        $result = db_query_bound($query, array(plugin_config_get('group_prefix') . '%', (int) $usergroup_id));
    } else {
        $result = db_query_bound($query, array((int) $usergroup_id));
    }
    $count = db_num_rows($result);
    for ($i = 0; $i < $count; $i++) {
        $row = db_fetch_array($result);
        if ($row['id'] == $usergroup_id) {
            continue;
            //usergroup must not be nested with itself
        }
        echo '<option value="' . $row['id'] . '" ';
        if (!is_null($row['group_user_id'])) {
            echo 'selected="selected"';
        } else {
            echo '';
        }
        echo '>' . $row['username'] . '</option>';
    }
}
开发者ID:svgaman,项目名称:ManageUsergroups,代码行数:39,代码来源:functions.php

示例14: access_ensure_project_level

<?php

access_ensure_project_level(plugin_config_get('serials_view_threshold'));
header('Content-Type: application/json');
$g_mantis_serials_customer = plugin_table('customer');
$g_mantis_serials_assembly = plugin_table('assembly');
$g_mantis_serials_format = plugin_table('format');
$g_mantis_serials_serial = plugin_table('serial');
$p_assembly_id = gpc_get_string('assembly_id');
function get_format($p_assembly_id)
{
    $t_assembly_id = $p_assembly_id;
    global $g_mantis_serials_format;
    $query = "SELECT format, format_id, format_example\n\t\t\t\tFROM {$g_mantis_serials_format}\n\t\t\t\tWHERE assembly_id='{$t_assembly_id}'";
    $result = mysql_query($query) or die(mysql_error());
    //Create an array
    $json_response = array();
    while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
        $row_array['format'] = $row['format'];
        $row_array['format_id'] = $row['format_id'];
        $row_array['format_example'] = $row['format_example'];
        //push the values in the array
        array_push($json_response, $row_array);
    }
    $jsonString = json_encode($json_response);
    echo $jsonString;
}
echo get_format($p_assembly_id);
开发者ID:khinT,项目名称:mantisbt-master,代码行数:28,代码来源:format.php

示例15: get_all_users_from_group

 /**
  * Returns an array of all users from the group user id param. Calls itself,
  * if it detects a nested group.
  * @param int $p_group_user_id user_id of a group
  * @return array Array of users in the group
  */
 function get_all_users_from_group($p_group_user_id)
 {
     $t_table_users = plugin_table('users');
     $t_all_groups = $this->get_all_groups(TRUE);
     $query = "SELECT user FROM {$t_table_users} WHERE group_user_id=" . db_param();
     $result = db_query_bound($query, array($p_group_user_id));
     $count = db_num_rows($result);
     $t_users = array();
     for ($i = 0; $i < $count; $i++) {
         $row = db_fetch_array($result);
         if (in_array($row['user'], $t_all_groups)) {
             $t_users = $t_users + $this->get_all_users_from_group($row['user']);
         } else {
             $t_users[] = $row['user'];
         }
     }
     return $t_users;
 }
开发者ID:svgaman,项目名称:ManageUsergroups,代码行数:24,代码来源:ManageUsergroups.php


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