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

PHP plugin_table函数代码示例

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

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



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


示例16: gpc_get_string

   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/
$xmpp_login = gpc_get_string('xmpp_login', '');
$user_id = gpc_get_string('user_id', '');
// Get user login
$user_table = db_get_table('mantis_user_table');
$query_rep_user_name = "SELECT username FROM {$user_table} WHERE id = {$user_id};";
$res_user_name = db_query($query_rep_user_name);
while ($row_user_name = db_fetch_array($res_user_name)) {
    $user_name = $row_user_name['username'];
}
// Add xmpp login
if ($xmpp_login != '') {
    $xmpp_table = plugin_table('xmpp_login', 'JabberNotifierSystem');
    $query_xmpp_login = "SELECT xmpp_login FROM {$xmpp_table} WHERE user_id = {$user_id};";
    $res_xmpp_login = db_query($query_xmpp_login);
    if (db_num_rows($res_xmpp_login) == 0) {
        if ($xmpp_login != $user_name) {
            $add_user_query = "INSERT INTO {$xmpp_table} (user_id, xmpp_login, chng_login) VALUES ({$user_id}, \"{$xmpp_login}\", 0);";
            db_query($add_user_query);
            print_successful_redirect('account_page.php');
        } else {
            print_successful_redirect('account_page.php');
            exit;
        }
    } else {
        $add_user_query = "UPDATE {$xmpp_table} SET xmpp_login = \"{$xmpp_login}\" WHERE user_id = {$user_id};";
        db_query_bound($add_user_query);
        print_successful_redirect('account_page.php');
开发者ID:JeromyK,项目名称:jabber-notify,代码行数:31,代码来源:change_xmpp_login.php


示例17: schema

 function schema()
 {
     return array(array('CreateTableSQL', array(plugin_table('src'), "\n            id              I       NOTNULL UNSIGNED AUTOINCREMENT PRIMARY,\n            bug_id          I       NOTNULL UNSIGNED,\n            p_version_id    I       UNSIGNED,\n            work_package    C(250)  DEFAULT ''\n            ")), array('CreateTableSQL', array(plugin_table('ptime'), "\n            id       I    NOTNULL UNSIGNED AUTOINCREMENT PRIMARY,\n            bug_id   I    NOTNULL UNSIGNED,\n            time     I    NOTNULL UNSIGNED\n            ")), array('CreateTableSQL', array(plugin_table('vers'), "\n            id          I   NOTNULL UNSIGNED AUTOINCREMENT PRIMARY,\n            project_id  I   NOTNULL UNSIGNED,\n            version_id  I   NOTNULL UNSIGNED,\n            type_id     I   UNSIGNED\n            ")), array('CreateTableSQL', array(plugin_table('type'), "\n            id           I       NOTNULL UNSIGNED AUTOINCREMENT PRIMARY,\n            type         C(250)  NOTNULL DEFAULT '',\n            opt          C(250)  DEFAULT ''\n            ")));
 }
开发者ID:Cre-ator,项目名称:Whiteboard.SpecificationManagement-Plugin,代码行数:4,代码来源:SpecManagement.php


示例18: import_full

 public function import_full($p_repo)
 {
     echo '<pre>';
     $t_branch = $p_repo->info['master_branch'];
     if (is_blank($t_branch)) {
         $t_branch = 'master';
     }
     if ($t_branch != '*') {
         $t_branches = array_map('trim', explode(',', $t_branch));
     } else {
         $t_heads_url = $this->uri_base($p_repo) . 'a=heads';
         $t_branches_input = url_get($t_heads_url);
         $t_branches_input = str_replace(array(PHP_EOL, '&lt;', '&gt;', '&nbsp;'), array('', '<', '>', ' '), $t_branches_input);
         $t_branches_input_p1 = strpos($t_branches_input, '<table class="heads">');
         $t_branches_input_p2 = strpos($t_branches_input, '<div class="page_footer">');
         $t_gitweb_heads = substr($t_branches_input, $t_branches_input_p1, $t_branches_input_p2 - $t_branches_input_p1);
         preg_match_all('/<a class="list name".*>(.*)<\\/a>/iU', $t_gitweb_heads, $t_matches, PREG_SET_ORDER);
         $t_branches = array();
         foreach ($t_matches as $match) {
             $t_branch = trim($match[1]);
             if ($match[1] != 'origin' and !in_array($t_branch, $t_branches)) {
                 $t_branches[] = $t_branch;
             }
         }
     }
     $t_changesets = array();
     $t_changeset_table = plugin_table('changeset', 'Source');
     foreach ($t_branches as $t_branch) {
         $t_query = "SELECT parent FROM {$t_changeset_table}\n\t\t\t\tWHERE repo_id=" . db_param() . ' AND branch=' . db_param() . 'ORDER BY timestamp ASC';
         $t_result = db_query_bound($t_query, array($p_repo->id, $t_branch), 1);
         $t_commits = array($t_branch);
         if (db_num_rows($t_result) > 0) {
             $t_parent = db_result($t_result);
             echo "Oldest '{$t_branch}' branch parent: '{$t_parent}'\n";
             if (!empty($t_parent)) {
                 $t_commits[] = $t_parent;
             }
         }
         $t_changesets = array_merge($t_changesets, $this->import_commits($p_repo, $this->uri_base($p_repo), $t_commits, $t_branch));
     }
     echo '</pre>';
     return $t_changesets;
 }
开发者ID:01-Scripts,项目名称:source-integration,代码行数:43,代码来源:SourceGitweb.php


示例19: foreach

# loop through all users
foreach ($a_users as $i_userId => $a_properties) {
    # get all mite projects and services of the user
    ################################################
    $s_query = "SELECT type, name, mite_project_id , mite_service_id FROM " . plugin_table(Mantis2mitePlugin::DB_TABLE_PS) . " WHERE user_id = " . $i_userId;
    $r_result = db_query_bound($s_query);
    $b_userHasMiteData = db_num_rows($r_result) > 0;
    while ($b_userHasMiteData && ($a_row = db_fetch_array($r_result))) {
        $s_type = $a_row['type'];
        $s_rsrcTypeFieldName = Mantis2mitePlugin::$a_fieldNamesMiteRsrcTypes[$s_type];
        $a_userMiteData[$s_type][$a_row[$s_rsrcTypeFieldName]] = $a_row['name'];
    }
    # get time entries for this bug and
    # build a modifieable list as output
    ####################################
    $s_query = "\n\t\t\tSELECT * FROM " . plugin_table(Mantis2mitePlugin::DB_TABLE_TE) . "\n\t\t\tWHERE user_id = {$i_userId} AND bug_id = {$i_bugId} ORDER BY created_at DESC";
    $r_result = db_query_bound($s_query);
    $b_pageHasUserTimeEnries = db_num_rows($r_result) > 0;
    $s_patternTwoDigits = '%d:%02d';
    while ($b_pageHasUserTimeEnries && ($a_row = db_fetch_array($r_result))) {
        if ($i_counter == 0) {
            $s_cssClass = " class='firstRow'";
        }
        $i_totalTime += $a_row['mite_duration'];
        if ($a_row['mite_note']) {
            $s_noteToggler = "\n\t    \t\t\t<a href='#' class='plugin_mite_time_entry_show_note'>" . lang_get('plugin_mite_time_entry_show_note') . "\n\t    \t\t\t\t<span>" . html_entity_decode($a_row['mite_note'], ENT_QUOTES, 'UTF-8') . "</span>\n\t\t    \t\t</a>";
        }
        $s_userEntries .= "\n\t    \t\t<tr>\n\t    \t\t\t<td" . $s_cssClass . ">";
        if ($i_currentUserId == $i_userId) {
            $s_userEntries .= "\n\t    \t\t\t<form>\n\t    \t\t\t\t<button class='plugin_mite_delete_time_entry'>" . lang_get('plugin_mite_delete_time_entry') . "</button>\n\t    \t\t\t\t<input type='hidden' name = 'mite_id' value = '" . $a_row['mite_time_entry_id'] . "' />\n\t\t\t\t\t</form>";
        }
开发者ID:01-Scripts,项目名称:Mantis2mite,代码行数:31,代码来源:time_entries_display.php


示例20: schema

 function schema()
 {
     return array(array('CreateTableSQL', array(plugin_table('repository'), "\n\t\t\t\tid\t\t\tI\t\tNOTNULL UNSIGNED AUTOINCREMENT PRIMARY,\n\t\t\t\ttype\t\tC(8)\tNOTNULL DEFAULT \" '' \" PRIMARY,\n\t\t\t\tname\t\tC(128)\tNOTNULL DEFAULT \" '' \" PRIMARY,\n\t\t\t\turl\t\t\tC(250)\tDEFAULT \" '' \",\n\t\t\t\tinfo\t\tXL\t\tNOTNULL\n\t\t\t\t", array('mysql' => 'DEFAULT CHARSET=utf8'))), array('CreateTableSQL', array(plugin_table('changeset'), "\n\t\t\t\tid\t\t\tI\t\tNOTNULL UNSIGNED AUTOINCREMENT PRIMARY,\n\t\t\t\trepo_id\t\tI\t\tNOTNULL UNSIGNED PRIMARY,\n\t\t\t\trevision\tC(250)\tNOTNULL PRIMARY,\n\t\t\t\tbranch\t\tC(250)\tNOTNULL DEFAULT \" '' \",\n\t\t\t\tuser_id\t\tI\t\tNOTNULL UNSIGNED DEFAULT '0',\n\t\t\t\ttimestamp\tT\t\tNOTNULL,\n\t\t\t\tauthor\t\tC(250)\tNOTNULL DEFAULT \" '' \",\n\t\t\t\tmessage\t\tXL\t\tNOTNULL,\n\t\t\t\tinfo\t\tXL\t\tNOTNULL\n\t\t\t\t", array('mysql' => 'DEFAULT CHARSET=utf8'))), array('CreateIndexSQL', array('idx_changeset_stamp_author', plugin_table('changeset'), 'timestamp, author')), array('CreateTableSQL', array(plugin_table('file'), "\n\t\t\t\tid\t\t\tI\t\tNOTNULL UNSIGNED AUTOINCREMENT PRIMARY,\n\t\t\t\tchange_id\tI\t\tNOTNULL UNSIGNED,\n\t\t\t\trevision\tC(250)\tNOTNULL,\n\t\t\t\tfilename\tXL\t\tNOTNULL\n\t\t\t\t", array('mysql' => 'DEFAULT CHARSET=utf8'))), array('CreateIndexSQL', array('idx_file_change_revision', plugin_table('file'), 'change_id, revision')), array('CreateTableSQL', array(plugin_table('bug'), "\n\t\t\t\tchange_id\tI\t\tNOTNULL UNSIGNED PRIMARY,\n\t\t\t\tbug_id\t\tI\t\tNOTNULL UNSIGNED PRIMARY\n\t\t\t\t", array('mysql' => 'DEFAULT CHARSET=utf8'))), array('AddColumnSQL', array(plugin_table('file'), "\n\t\t\t\taction\t\tC(8)\tNOTNULL DEFAULT \" '' \"\n\t\t\t\t")), array('AddColumnSQL', array(plugin_table('changeset'), "\n\t\t\t\tparent\t\tC(250)\tNOTNULL DEFAULT \" '' \"\n\t\t\t\t")), array('AddColumnSQL', array(plugin_table('changeset'), "\n\t\t\t\tported\t\tC(250)\tNOTNULL DEFAULT \" '' \"\n\t\t\t\t")), array('AddColumnSQL', array(plugin_table('changeset'), "\n\t\t\t\tauthor_email\tC(250)\tNOTNULL DEFAULT \" '' \"\n\t\t\t\t")), array('AddColumnSQL', array(plugin_table('changeset'), "\n\t\t\t\tcommitter\t\tC(250)\tNOTNULL DEFAULT \" '' \",\n\t\t\t\tcommitter_email\tC(250)\tNOTNULL DEFAULT \" '' \",\n\t\t\t\tcommitter_id\tI\t\tNOTNULL UNSIGNED DEFAULT '0'\n\t\t\t\t")), array('CreateTableSQL', array(plugin_table('branch'), "\n\t\t\t\trepo_id\t\tI\t\tNOTNULL UNSIGNED PRIMARY,\n\t\t\t\tbranch\t\tC(128)\tNOTNULL PRIMARY,\n\t\t\t\ttype\t\tI\t\tNOTNULL UNSIGNED DEFAULT '0',\n\t\t\t\tversion\t\tC(64)\tNOTNULL DEFAULT \" '' \",\n\t\t\t\tregex\t\tC(128)\tNOTNULL DEFAULT \" '' \"\n\t\t\t\t", array('mysql' => 'DEFAULT CHARSET=utf8'))), array('CreateTableSQL', array(plugin_table('user'), "\n\t\t\t\tuser_id\t\tI\t\tNOTNULL UNSIGNED PRIMARY,\n\t\t\t\tusername\tC(64)\tNOTNULL DEFAULT \" '' \"\n\t\t\t\t", array('mysql' => 'DEFAULT CHARSET=utf8'))), array('CreateIndexSQL', array('idx_source_user_username', plugin_table('user'), 'username', array('UNIQUE'))), array('UpdateSQL', array(plugin_table('repository'), " SET type='websvn' WHERE type='svn'")), array('AddColumnSQL', array(plugin_table('branch'), "\n\t\t\t\tpvm_version_id\tI\t\tNOTNULL UNSIGNED DEFAULT '0'\n\t\t\t\t")));
 }
开发者ID:Sansumaki,项目名称:source-integration,代码行数:4,代码来源:Source.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP plugin_types函数代码示例发布时间:2022-05-15
下一篇:
PHP plugin_supports函数代码示例发布时间: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