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

PHP endtable函数代码示例

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

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



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

示例1: album_share_codes_main

function album_share_codes_main()
{
    $superCage = Inspekt::makeSuperCage();
    if ($superCage->get->testInt('album')) {
        global $CONFIG;
        $aid = $superCage->get->getInt('album');
        $result = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE aid = '{$aid}'");
        if (mysql_num_rows($result) > 0) {
            while ($row = mysql_fetch_assoc($result)) {
                $url = $CONFIG['ecards_more_pic_target'] . 'displayimage.php?pid=' . $row['pid'];
                $thumb = $CONFIG['ecards_more_pic_target'] . get_pic_url($row, 'thumb');
                $content1 .= '[url=' . $url . '][img]' . $thumb . '[/img][/url]' . "\n";
                $content2 .= '<a href="' . $url . '"><img src="' . $thumb . ' /></a>' . "\n";
            }
            starttable(-1, 'Share codes for <i>all files</i> in this album');
            echo <<<EOT
                <tr>
                    <td class="tableb">
                        <tt>[url][img][/url]</tt>: <textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">{$content1}</textarea>
                        <br />
                        <tt>&lt;a&gt;&lt;img&gt;&lt;/a&gt;</tt>: <textarea onfocus="this.select();" onclick="this.select();" class="textinput" rows="1" cols="64" wrap="off" style="overflow:hidden; height:15px;">{$content2}</textarea>
                    </td>
                </tr>
EOT;
            endtable();
        }
    }
}
开发者ID:phill104,项目名称:branches,代码行数:28,代码来源:codebase.php


示例2: cpg_phpinfo_mod_output

function cpg_phpinfo_mod_output($search, $output_type)
{
    // first parameter is the module name, second parameter is the way you want your output to look like: table or text
    $pieces = cpg_phpinfo_mod($search);
    $summ = '';
    $return = '';
    $debug_underline = '&#0010;------------------&#0010;';
    $debug_separate = '&#0010;==========================&#0010;';
    if ($output_type == 'table') {
        ob_start();
        starttable('100%', 'Module: ' . $search, 2);
        $return .= ob_get_contents();
        ob_end_clean();
    } else {
        $return .= 'Module: ' . $search . $debug_underline;
    }
    foreach ($pieces as $val) {
        if ($output_type == 'table') {
            $return .= '<tr><td>';
        }
        $return .= $val[0];
        if ($output_type == 'table') {
            $return .= '</td><td>';
        }
        $return .= $val[1];
        if ($output_type == 'table') {
            $return .= '</td></tr>';
        }
        $summ .= $val[0];
    }
    if (!$summ) {
        if ($output_type == 'table') {
            $return .= '<tr><td colspan="2">';
        }
        $return .= 'module doesn\'t exist';
        if ($output_type == 'table') {
            $return .= '</td></tr>';
        }
    }
    if ($output_type == 'table') {
        ob_start();
        endtable();
        $return .= ob_get_contents();
        ob_end_clean();
    } else {
        $return .= $debug_separate;
    }
    return $return;
}
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:49,代码来源:functions.inc.php


示例3: edit_user


//.........这里部分代码省略.........
                        <input type="radio" id="yes" name="{$element[1]}" value="YES" {$yes_selected} /><label for="yes" class="clickable_option">{$lang_common['yes']}</label>
                        &nbsp;&nbsp;
                        <input type="radio" id="no" name="{$element[1]}" value="NO" {$no_selected} /><label for="no" class="clickable_option">{$lang_common['no']}</label>
                    </td>
            </tr>

EOT;
                break;
            case 'group_list':
                $sql = "SELECT group_id, group_name FROM {$CONFIG['TABLE_USERGROUPS']} ORDER BY group_name";
                $result = cpg_db_query($sql);
                $group_list = cpg_db_fetch_rowset($result);
                mysql_free_result($result);
                $sel_group = $user_data[$element[1]];
                $user_group_list = $user_data['user_group_list'] == '' ? ',' . $sel_group . ',' : ',' . $user_data['user_group_list'] . ',' . $sel_group . ',';
                echo <<<EOT
            <tr>
                <td class="{$row_style_class}" valign="top">
                            {$element[2]}
            </td>
            <td class="{$row_style_class}" valign="top">
                    <select name="{$element[1]}" class="listbox">

EOT;
                $group_cb = '';
                foreach ($group_list as $group) {
                    echo '                        <option value="' . $group['group_id'] . '"' . ($group['group_id'] == $sel_group || $op == 'new_user' && $group['group_id'] == 2 ? ' selected="selected"' : '') . '>' . $group['group_name'] . '</option>' . $LINEBREAK;
                    if ($group['group_id'] != 3) {
                        $checked = strpos(' ' . $user_group_list, ',' . $group['group_id'] . ',') ? 'checked="checked"' : '';
                        $group_cb .= '<input name="group_list[]" type="checkbox" value="' . $group['group_id'] . '" ' . $checked . ' />' . $group['group_name'] . '<br />' . $LINEBREAK;
                    }
                }
                $assignedGroupsHelp = cpg_display_help('f=users.htm&amp;as=user_cp_edit_permission_by_group&amp;ae=user_cp_edit_permission_by_group_end', '450', '300');
                echo <<<EOT
                            </select><br />
                            {$group_cb}
                            <br />
                            <a href="usermgr.php?op=groups_alb_access&amp;form_token={$form_token}&amp;timestamp={$timestamp}" class="admin_menu">{$lang_usermgr_php['groups_alb_access']}</a>
                            {$assignedGroupsHelp}

              </td>
            </tr>

EOT;
                break;
            case 'checkbox':
                echo <<<EOT
            <tr>
                <td class="{$row_style_class}" valign="top">
                            <label for="send_login_data">{$element[2]}</label>
            </td>
                    <td class="{$row_style_class} valign="top"">
                        <input type="checkbox" id="send_login_data" name="{$element[1]}" value="YES" />
                    </td>
            </tr>

EOT;
                break;
            default:
                cpg_die(CRITICAL_ERROR, 'Invalid action for form creation ' . $element[0], __FILE__, __LINE__);
        }
    }
    if ($op == 'new_user') {
        echo <<<EOT
        <tr>
                <td colspan="2" align="center" class="tablef">
                        <button type="submit" class="button" name="usermgr_edit_submit" value="{$lang_usermgr_php['submit']}">{$icon_array['ok']}{$lang_usermgr_php['submit']}</button>
                        <input type="hidden" name="form_token" value="{$form_token}" />
                        <input type="hidden" name="timestamp" value="{$timestamp}" />
                </td>
        </tr>

EOT;
    } else {
        echo <<<EOT
        <tr>
                <td colspan="2" class="tableh2">
                        {$lang_usermgr_php['notes']}
                </td>
        </tr>
        <tr>
                <td colspan="2" class="tableb">
                        <ul>
                            <li>{$lang_usermgr_php['note_list']}</li>
                        </ul>
                </td>
        </tr>
        <tr>
                <td colspan="2" align="center" class="tablef">
                        <button type="submit" class="button" name="usermgr_edit_submit" value="{$lang_usermgr_php['modify_user']}">{$icon_array['ok']}{$lang_usermgr_php['modify_user']}</button>
                        <input type="hidden" name="form_token" value="{$form_token}" />
                        <input type="hidden" name="timestamp" value="{$timestamp}" />
                </td>
        </tr>

EOT;
    }
    endtable();
    echo '</form>';
}
开发者ID:CatBerg-TestOrg,项目名称:coppermine_1.6.x,代码行数:101,代码来源:usermgr.php


示例4: display_plugin_list

function display_plugin_list()
{
    global $CPG_PLUGINS, $lang_pluginmgr_php, $lang_plugin_php, $lang_common, $CONFIG, $CPG_PHP_SELF;
    list($timestamp, $form_token) = getFormToken();
    $help = '&nbsp;' . cpg_display_help('f=plugins.htm&amp;as=plugin_manager&amp;ae=plugin_manager_end&amp;top=1', '800', '600');
    $help_plugin_enable = cpg_display_help('f=configuration.htm&amp;as=admin_general_enable-plugins&amp;ae=admin_general_enable-plugins_end', 400, 300);
    // configure plugin api (enabled or disabled)
    $yes_selected = $CONFIG['enable_plugins'] ? 'checked="checked"' : '';
    $no_selected = !$CONFIG['enable_plugins'] ? 'checked="checked"' : '';
    print '<form name="pluginenableconfig" id="cpgform2" action="' . $CPG_PHP_SELF . '" method="post" style="margin:0px;padding:0px">';
    starttable('-1', cpg_fetch_icon('plugin_mgr', 2) . $lang_pluginmgr_php['pmgr'] . $help, 3);
    echo <<<EOT
        <tr>
                <td class="tableh2" colspan="3">
                    {$lang_pluginmgr_php['explanation']}
                </td>
        </tr>
        <tr>
                <td class="tableb">
                    {$lang_pluginmgr_php['plugin_enabled']}
                </td>
                <td class="tableb">
                    <input type="radio" id="enable_plugins1" name="enable_plugins" value="1"  onclick="document.pluginenableconfig.submit();" {$yes_selected} class="radio" /><label for="enable_plugins1" class="clickable_option">{$lang_common['yes']}</label>
                    &nbsp;&nbsp;
                    <input type="radio" id="enable_plugins0" name="enable_plugins" value="0"  onclick="document.pluginenableconfig.submit();" {$no_selected} class="radio" /><label for="enable_plugins0" class="clickable_option">{$lang_common['no']}</label>
                    <input type="hidden" name="update_config" value="1" />
                    <input type="hidden" name="form_token" value="{$form_token}" />
                    <input type="hidden" name="timestamp" value="{$timestamp}" />
                </td>
                <td class="tableb">
                    {$help_plugin_enable}
                </td>
        </tr>
EOT;
    endtable();
    print '</form>';
    echo <<<EOT
        <br />
EOT;
    $help = '&nbsp;' . cpg_display_help('f=plugins.htm&amp;as=plugin_manager_uninstall&amp;ae=plugin_manager_uninstall_end&amp;top=1', '640', '480');
    $available_plugins = cpg_get_dir_list('./plugins/');
    starttable('100%');
    echo <<<EOT
        <tr>
                <td class="tableh1" width="90%"><strong><span class="statlink">{$lang_pluginmgr_php['i_plugins']}</span></strong></td>
                <td colspan="3" class="tableh1" align="center" width="10%"><strong><span class="statlink">{$lang_pluginmgr_php['operation']}</span></strong>{$help}</td>
        </tr>
EOT;
    unset($installed_plugins);
    if ($CONFIG['enable_plugins'] == 1) {
        $loop_counter = 0;
        foreach ($CPG_PLUGINS as $thisplugin) {
            $installed_plugins[$loop_counter] = array('index' => $thisplugin->index, 'plugin_id' => $thisplugin->plugin_id, 'path' => $thisplugin->path, 'priority' => $thisplugin->priority, 'error' => $thisplugin->error);
            $loop_counter++;
        }
    } else {
        // If plugin system is turned off, grab installed plugins from database table
        $query = 'SELECT * FROM ' . $CONFIG['TABLE_PLUGINS'] . ' ORDER BY priority ASC;';
        $result = cpg_db_query($query);
        $loop_counter = 0;
        while ($installed_plugin = mysql_fetch_assoc($result)) {
            $installed_plugins[$loop_counter] = array('index' => $loop_counter, 'plugin_id' => $installed_plugin['plugin_id'], 'path' => $installed_plugin['path'], 'priority' => $installed_plugin['priority'], 'error' => array());
            $loop_counter++;
        }
    }
    $installed_count = 0;
    $loop_counter = 0;
    if (isset($installed_plugins) == TRUE) {
        $plugins_count = count($installed_plugins);
        foreach ($installed_plugins as $thisplugin) {
            $installed_count++;
            unset($extra_info);
            unset($install_info);
            include './plugins/' . $thisplugin['path'] . '/configuration.php';
            $pluginPath = $thisplugin['path'];
            $safename = addslashes(str_replace('&nbsp;', '', $name));
            if (isset($extra_info) == TRUE) {
                $extra = $extra_info;
            } else {
                $extra = '';
            }
            if (sizeof($thisplugin['error']) > 0) {
                $error = $thisplugin['error']['desc'];
                $extra = '<tr><td class="tableb" width="100%" colspan="2">' . '<strong>' . $lang_common['error'] . ':</strong> <span style="color:red;">' . $error . '</span>' . '</td></tr>' . $extra;
            }
            if ($loop_counter == 0) {
                $row_style_class = 'tableb';
            } else {
                $row_style_class = 'tableb tableb_alternate';
            }
            $loop_counter++;
            if ($loop_counter > 1) {
                $loop_counter = 0;
            }
            echo <<<EOT
        <tr>
            <td width="90%" class="{$row_style_class}">
                <a name="{$pluginPath}"></a>
                <table border="0" width="100%" cellspacing="0" cellpadding="0" class="maintable">
                    <tr>
//.........这里部分代码省略.........
开发者ID:JoseCOCA,项目名称:baudprint,代码行数:101,代码来源:pluginmgr.php


示例5: theme_display_image

function theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip)
{
    global $CONFIG, $LINEBREAK;
    $superCage = Inspekt::makeSuperCage();
    $width = $CONFIG['picture_table_width'];
    echo '<a name="top_display_media"></a>';
    // set the navbar-anchor
    starttable();
    echo $nav_menu;
    endtable();
    starttable();
    echo "<tr>";
    echo "<td height='100%'><table width='100%'><!-- gb before picture -->";
    echo $picture;
    echo "</table></td><!-- gb after picture -->";
    if ($CONFIG['display_film_strip'] == 1) {
        echo "<td width='200' height='100%' class=\"tablebspecial\"><!-- gb before film_strip -->";
        echo $film_strip;
        echo "</td><!-- gb after film_strip -->";
    }
    echo "</tr>";
    endtable();
    echo $votes;
    $picinfo = $superCage->cookie->keyExists('picinfo') ? $superCage->cookie->getAlpha('picinfo') : ($CONFIG['display_pic_info'] ? 'block' : 'none');
    echo $LINEBREAK . '<div id="picinfo" style="display: ' . $picinfo . ';">' . $LINEBREAK;
    starttable();
    echo $pic_info;
    endtable();
    echo '</div>' . $LINEBREAK;
    echo '<a name="comments_top"></a>';
    echo '<div id="comments">' . $LINEBREAK;
    echo $comments;
    echo '</div>' . $LINEBREAK;
}
开发者ID:phill104,项目名称:branches,代码行数:34,代码来源:theme.php


示例6: reload

function reload()
{
    global $filelist, $counter, $lang_plugin_mass_import, $output_array, $lang_common, $mass_import_icon_array;
    // Create the super cage
    $superCage = Inspekt::makeSuperCage();
    if ($superCage->post->keyExists('auto') || $superCage->post->keyExists('directory') || $superCage->post->keyExists('sleep') || $superCage->post->keyExists('hardlimit')) {
        // Do nothing
    } else {
        exit;
    }
    $remaining = countup($filelist);
    $filelist = base64_encode(serialize($filelist));
    if ($superCage->post->keyExists('auto') && $superCage->post->getInt('auto') == 1) {
        $auto = 'checked = "checked"';
    } else {
        $auto = '';
    }
    if ($counter != 0) {
        $counter = $output_array['row_start'] . $lang_plugin_mass_import['files_added'] . ': ' . $output_array['row_separator'] . $counter . $output_array['row_end'];
    } else {
        $counter = $output_array['row_start'] . $lang_plugin_mass_import['structure_created'] . $output_array['row_separator'] . $output_array['row_end'];
    }
    if ($superCage->post->keyExists('directory')) {
        $directory = $superCage->post->getRaw('directory');
        // We rely on the fact that only the admin can run this page
    } else {
        $directory = '';
    }
    if ($superCage->post->keyExists('sleep')) {
        $sleep = $superCage->post->getInt('sleep');
    } else {
        $sleep = '1000';
    }
    if ($superCage->post->keyExists('hardlimit')) {
        $hardlimit = $superCage->post->getInt('hardlimit');
    } else {
        $hardlimit = '0';
    }
    $js = $superCage->post->keyExists('auto') && $remaining ? '<script type="text/javascript"> onload = document.form.submit();</script>' : '';
    if (!connection_aborted()) {
        echo $counter;
        echo $output_array['row_start'] . $lang_plugin_mass_import['files_to_add'] . ': ' . $output_array['row_separator'] . $remaining . $output_array['row_end'];
        echo <<<EOT
    {$output_array['row_start']}
        <input name="filelist" type="hidden" value="{$filelist}" />
        <input type="hidden" name="directory" value="{$directory}" />\t
        {$lang_plugin_mass_import['sleep_desc']}:
        {$output_array['row_separator']}\t
        <input type="text" name="sleep" id="sleep" value="{$sleep}" size="5" maxlength="5" class="textinput spin-button" /> ({$lang_plugin_mass_import['in_milliseconds']})
        {$output_array['row_end']}
        {$output_array['row_start']}
        {$lang_plugin_mass_import['hardlimit_desc']}: 
        {$output_array['row_separator']}\t
        <input type="text" name="hardlimit" id="hardlimit" value="{$hardlimit}" size="3" maxlength="3" class="textinput spin-button" />
        {$output_array['row_end']}
        {$output_array['row_start']}
        <label for="auto" class="clickable_option">{$lang_plugin_mass_import['autorun_desc']}</label>: 
        {$output_array['row_separator']}\t
        <input type="checkbox" name="auto" id="auto" value="1" class="checkbox" {$auto} />
        {$output_array['row_end']}
        {$output_array['row_start']}
        <button type="submit" class="button" name="continue" value="{$lang_common['continue']}">{$mass_import_icon_array['continue']}{$lang_common['continue']}</button>
        {$output_array['row_separator']}
        {$output_array['row_end']}

EOT;
    }
    echo $js;
    endtable();
    echo <<<EOT
    </form>
EOT;
    pagefooter();
}
开发者ID:phill104,项目名称:branches,代码行数:74,代码来源:import.php


示例7: theme_minicms_edit_editor

function theme_minicms_edit_editor(&$cms)
{
    global $MINICMS, $referer, $lang_minicms, $CONFIG, $THEME_DIR;
    ob_start();
    echo '<SELECT name="type">';
    foreach ($MINICMS['conType'] as $key => $conType) {
        if ($key == $cms['type']) {
            echo "<OPTION selected value=\"{$key}\">{$conType}</OPTION>";
        } else {
            echo "<OPTION value=\"{$key}\">{$conType}</OPTION>";
        }
    }
    echo '</SELECT>';
    $cms['select_type'] = ob_get_clean();
    print <<<EOT
        <form name="post" method="post" action="index.php?file=minicms/cms_edit&amp;referer={$referer}">
EOT;
    starttable("100%", $cms['title'], 3);
    print <<<EOT
        <tr>
            <td colspan="3" align="center">
                <h2>{$cms['message']}</h2>
            </td>
        </tr>
        <tr>
            <td>{$lang_minicms['title']}</td>
            <td>{$lang_minicms['type']}</td>
            <td>{$lang_minicms['content']}</td>
        </tr>
        <tr valign="top">
            <td class="row2">
                <input value="{$cms['ID']}" type="hidden" name="id" >
                <input type="text" value="{$cms['title']}" class="post" tabindex="1" style="width: 450px;" maxlength="60" size="45" name="title" />
            </td>
            <td class="row2">
                {$cms['select_type']}
            </td>
            <td class="row2">
                <input type="text" value="{$cms['conid']}" class="post" tabindex="3" style="width: 50px;" maxlength="5" name="conid" />
            </td>
        </tr>
        <tr valign="top">
            <td class="row2" colspan="3">
EOT;
    foreach (get_smilies_table2() as $smiley) {
        $smilies[] = $smiley[1];
    }
    //$smilies="['".implode("','",$smilies)."']";
    //$smilies=implode(",",$smilies);
    //echo "<br>$smilies";
    $superCage = Inspekt::makeSuperCage();
    $cmpath = str_replace('index.php', '', $superCage->server->getRaw('PHP_SELF'));
    $userfilespath = $cmpath . $CONFIG['fullpath'];
    $basepath = $cmpath . 'plugins/minicms/fckeditor/';
    $oFCKeditor = new FCKeditor('minicms_content');
    $oFCKeditor->BasePath = $basepath;
    $oFCKeditor->Width = '100%';
    $oFCKeditor->Height = '350';
    $oFCKeditor->Value = $cms['content'];
    $oFCKeditor->Config['BaseHref'] = $CONFIG['ecards_more_pic_target'];
    $oFCKeditor->Config['CustomConfigurationsPath'] = $basepath . 'minicms_config.js';
    //  $oFCKeditor->Config['SmileyPath']      = $cmpath . 'images/smiles/';  //couldn't get the smilies to work
    //  $oFCKeditor->Config['SmileyImages']    = $smilies;          //I posted the problem of FCK's project site
    $oFCKeditor->Config['EditorAreaCSS'] = $cmpath . $THEME_DIR . 'style.css';
    $oFCKeditor->Config['StylesXmlPath'] = $basepath . 'style.xml';
    //  $oFCKeditor->Config['UseBROnCarriageReturn'] = true;  I don't think we wan't this option.
    //  $oFCKeditor->Config['LinkBrowserURL']  = $basepath . 'editor/filemanager/browser/default/browser.html?Connector=connectors/php/connector.php&ServerPath='.$userfilespath;
    //  $oFCKeditor->Config['ImageBrowserURL'] = $basepath . 'editor/filemanager/browser/default/browser.html?Type=Image&Connector=connectors/php/connector.php&ServerPath='.$userfilespath;
    //  $oFCKeditor->Config['FlashBrowserURL'] = $basepath . 'editor/filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/php/connector.php&ServerPath='.$userfilespath;
    // 	$oFCKeditor->Config['MediaBrowserURL'] = $basepath . 'editor/filemanager/browser/default/browser.html?Type=Media&Connector=connectors/php/connector.php&ServerPath='.$userfilespath;
    //	$oFCKeditor->Config['LinkUploadURL']   = $basepath . 'editor/filemanager/upload/php/upload.php&ServerPath='.$userfilespath;
    //	$oFCKeditor->Config['ImageUploadURL']  = $basepath . 'editor/filemanager/upload/php/upload.php?Type=Image&ServerPath='.$userfilespath;
    //	$oFCKeditor->Config['FlashUploadURL']  = $basepath . 'editor/filemanager/upload/php/upload.php?Type=Flash&ServerPath='.$userfilespath;
    //	$oFCKeditor->Config['MediaUploadURL']  = $basepath . 'editor/filemanager/upload/php/upload.php?Type=Media&ServerPath='.$userfilespath;
    //  $oFCKeditor->Config['PluginsPath'] = $basepath . 'editor/plugins/';
    //  $oFCKeditor->Config['SkinPath'] = $basepath . 'editor/skins/silver/';
    //  $oFCKeditor->Config['Debug'] = true;
    //  $oFCKeditor->Config['UserFilesPath'] = $userfilespath;
    $oFCKeditor->Create();
    print <<<EOT
            </td>
        </tr>
        <tr>
            <td align="center" colspan="3" class="catBottom">
                <input value="{$lang_minicms['preview']}" class="mainoption" name="submit" tabindex="5" type="submit">&nbsp;
                <input value="{$lang_minicms['submit']}" class="mainoption" name="submit" tabindex="6" accesskey="s" type="submit">
            </td>
        </tr>
    </form>
EOT;
    endtable();
}
开发者ID:phill104,项目名称:branches,代码行数:92,代码来源:fckeditor_edit.inc.php


示例8: write_to_db


//.........这里部分代码省略.........
                $link = mysql_connect($_POST['db_hostname'], $_POST['db_username'], $_POST['db_password']);
                $mysql_error_output = ob_get_contents();
                ob_end_clean();
                if (!$link) {
                    $return[$step] = $lang_bridgemgr_php['error_db_connect'] . '<tt>' . $mysql_error_output . '</tt>';
                } elseif ($default_bridge_data[$BRIDGE['short_name']]['db_database_name_used'] != '') {
                    // check the database
                    ob_start();
                    $db_selected = mysql_select_db($_POST['db_database_name'], $link);
                    print mysql_error();
                    $mysql_error_output = ob_get_contents();
                    ob_end_clean();
                    if (!$db_selected) {
                        $return['db_database_name'] = sprintf($lang_bridgemgr_php['error_db_name'], '<i>' . $_POST['db_database_name'] . '</i>', '<i>' . $lang_bridgemgr_php['db_database_name'] . '</i>') . ' <tt>' . $mysql_error_output . '</tt>';
                    }
                }
                @mysql_close($link);
                cpg_db_connect();
                // connect back to coppermine db
            }
            // check the db connection --- end
            break;
        case "db_tables":
            if ($default_bridge_data[$BRIDGE['short_name']]['table_prefix_used'] != '') {
                $prefix_and_table = sprintf($lang_bridgemgr_php['error_prefix_and_table'], '<i>' . $lang_bridgemgr_php['table_prefix'] . '</i>');
            }
            @mysql_close();
            //temporarily disconnect from the coppermine database
            $link = @mysql_connect($BRIDGE['db_hostname'], $BRIDGE['db_username'], $BRIDGE['db_password']);
            $db_selected = @mysql_select_db($BRIDGE['db_database_name'], $link);
            $loop_table_names = array('user_table', 'session_table', 'group_table', 'group_table', 'group_relation_table', 'group_mapping_table');
            foreach ($loop_table_names as $key) {
                // loop through the possible tables --- start
                if ($default_bridge_data[$BRIDGE['short_name']][$key . '_used'] != '') {
                    // check if table exists --- start
                    $temp_tablename = $_POST['table_prefix'] . $_POST[$key];
                    $result = mysql_query('SELECT * FROM ' . $temp_tablename);
                    if (!$result) {
                        $return['db_' . $key] = sprintf($lang_bridgemgr_php['error_db_table'], '<i>' . $temp_tablename . '</i>', $prefix_and_table . '<i>' . $lang_bridgemgr_php[$key] . '</i>') . ' <tt>' . $mysql_error_output . '</tt>';
                    }
                    @mysql_free_result($result);
                }
                // check if table exists --- end
            }
            // loop through the possible tables --- end
            @mysql_close($link);
            cpg_db_connect();
            // connect back to coppermine db
            break;
    }
    // end switch
    // write the post data to the database
    //print_r($_POST);
    foreach ($_POST as $key => $value) {
        // filter the post data that doesn't get written
        if (array_key_exists($key, $BRIDGE)) {
            if ($CONFIG['debug_mode'] != 0) {
                // print what actually get's written when in debug_mode
                print '<span class="explanation">Writing to database: ';
                print $key . '|' . $value;
                print '<br /></span>';
            }
            if ($return[$key] != '') {
                //print '|Error in this key';
            } else {
                cpg_db_query("UPDATE {$CONFIG['TABLE_BRIDGE']} SET value = '{$value}' WHERE name = '{$key}'");
            }
            //print '<br />';
        }
    }
    $value = $_POST['bridge_enable'];
    if ($value != '0' && $value != '1') {
        $value = $CONFIG['bridge_enable'];
    }
    cpg_db_query("UPDATE {$CONFIG['TABLE_CONFIG']} SET value = '{$value}' WHERE name = 'bridge_enable'");
    if ($_POST['clear_unused_db_fields'] == 1) {
        // clear all database entries that aren't actually used with the current bridge file
        // not implemented yet (not sure if necessary after all)
    }
    // ouput error messages, if any
    if (is_array($return)) {
        starttable('100%', $lang_bridgemgr_php['error_title']);
        print '<tr><td class="tableb" align="left"><ul>';
        foreach ($return as $key) {
            print '<li>' . $key . '</li>';
        }
        print '</ul></td></tr>';
        print '<tr>' . $new_line;
        print '    <td class="tablef" align="center">' . $new_line;
        print '        <a href="javascript:history.back()" class="admin_menu" title="' . $lang_bridgemgr_php['back'] . '" />&laquo;' . $lang_bridgemgr_php['back'] . '</a>' . $new_line;
        print '    </td>' . $new_line;
        print '</tr>' . $new_line;
        endtable();
        $error = 1;
    }
    print '<br />';
    if ($error != '') {
        return 'error';
    }
}
开发者ID:phill104,项目名称:branches,代码行数:101,代码来源:bridgemgr.php


示例9: endtable

                                        <tr>
                                                <td class="tableh2">{$lang_search_php['albcatfields']}:</td>
                                                <td class="tableh2">&nbsp;</td>
                                        </tr>
                                        <tr>
                                                <td><input type="checkbox" name="album_title" id="album_title" class="checkbox" /><label for="album_title" class="clickable_option">{$lang_search_php['album_title']}</label></td>
                                                <td>&nbsp;</td>
                                        </tr>
                                        <tr>
                                                <td><input type="checkbox" name="category_title" id="category_title" class="checkbox" /><label for="category_title" class="clickable_option">{$lang_search_php['category_title']}</label></td>
                                                <td>&nbsp;</td>
                                        </tr>
                                </table>
                        </td>
                </tr>
EOT;
$text .= endtable(true);
$text .= '</form>';
$text = CPGPluginAPI::filter('search_form', $text);
echo $text;
if ($CONFIG['clickable_keyword_search'] != 0) {
    include 'include/keyword.inc.php';
}
echo <<<EOT
      <script language="javascript" type="text/javascript">
      <!--
      document.searchcpg.search.focus();
      -->
      </script>
EOT;
pagefooter();
开发者ID:CatBerg-TestOrg,项目名称:coppermine,代码行数:31,代码来源:search.php


示例10: visiblehookpoints_configure

function visiblehookpoints_configure()
{
    global $CONFIG, $lang_plugin_visiblehookpoints;
    $superCage = Inspekt::makeSuperCage();
    $req_uri = $superCage->server->getMatched('REQUEST_URI', '/([^\\/]+\\.php)$/');
    $req_uri = $req_uri[1];
    if ($CONFIG['plugin_visiblehookpoints_display'] == 1) {
        $invisible = '';
        $visible = 'checked="checked"';
        $admin_only = '';
    } elseif ($CONFIG['plugin_visiblehookpoints_display'] == 0) {
        $invisible = 'checked="checked"';
        $visible = '';
        $admin_only = '';
    } else {
        $invisible = '';
        $visible = '';
        $admin_only = 'checked="checked"';
    }
    $help_invisible = '&nbsp;' . cpg_display_help('f=empty.htm&amp;h=lang_plugin_visiblehookpoints[help_invisible_header]&amp;t=lang_plugin_visiblehookpoints[help_invisible_text]', 470, 245);
    $help_visible = '&nbsp;' . cpg_display_help('f=empty.htm&amp;h=lang_plugin_visiblehookpoints[help_visible_header]&amp;t=lang_plugin_visiblehookpoints[help_visible_text]', 470, 245);
    echo <<<EOT
    <form name="cpgform" id="cpgform" action="{$req_uri}" method="post">
EOT;
    starttable('100%', $lang_plugin_visiblehookpoints['config_name'] . ' - ' . $lang_plugin_visiblehookpoints['plugin_config'], 1);
    echo <<<EOT
              <tr>
                <td class="tableh2">
                  <h3>{$lang_plugin_visiblehookpoints['visibility_choose']}</h3>
                </td>
              </tr>
              <tr>
                <td class="tableb">
                  <input type="radio" name="visiblehookpoints_display" id="invisible" value="0" class="radio" {$invisible} />
                  <label for="invisible" class="clickable_option">{$lang_plugin_visiblehookpoints['visibility_parameter']}</label>{$help_invisible}
              </tr>
              <tr>
                <td class="tableb tableb_alternate">
                  <input type="radio" name="visiblehookpoints_display" id="visible" value="1" class="radio" {$visible} />
                  <label for="visible" class="clickable_option">{$lang_plugin_visiblehookpoints['visibility_permanent']}</label>{$help_visible}
              </tr>
              <!--<tr>
                <td class="tableb">
                  <input type="radio" name="visiblehookpoints_display" id="admin_only" value="2" class="radio" {$admin_only} />
                  <label for="admin_only" class="clickable_option">{$lang_plugin_visiblehookpoints['visibility_admin']}</label>
              </tr>-->
              <tr>
                <td class="tablef">
                  <input type="submit" value="{$lang_plugin_visiblehookpoints['save']}" class="button" />
                </td>
              </tr>
EOT;
    endtable();
    echo <<<EOT
    </form>
EOT;
}
开发者ID:CatBerg-TestOrg,项目名称:coppermine,代码行数:57,代码来源:codebase.php


示例11: display


//.........这里部分代码省略.........
        $ref = trim(getparam('ref', true));
        if ($ref != null && $ref != '') {
            $autorefresh = intval($ref);
        }
    }
    if ($pagesonly !== true) {
        $rig = trim(getparam('rig', true));
        $arg = trim(getparam('arg', true));
        $preprocess = null;
        if ($arg != null and $arg != '') {
            if ($rig != null and $rig != '' and $rig >= 0 and $rig < count($rigs)) {
                $parts = explode(':', $rigs[$rig], 3);
                if (count($parts) >= 2) {
                    $miner = $parts[0];
                    $port = $parts[1];
                    if ($readonly !== true) {
                        $preprocess = $arg;
                    }
                }
            }
        }
    }
    if ($allowcustompages === true) {
        $pg = trim(getparam('pg', true));
        if ($pagesonly === true) {
            if ($pg !== null && $pg !== '') {
                if ($userlist !== null && isset($userlist['def']) && !in_array($pg, $userlist['def'])) {
                    $pg = null;
                }
            } else {
                if ($userlist !== null && isset($userlist['def'])) {
                    foreach ($userlist['def'] as $pglook) {
                        if (isset($customsummarypages[$pglook])) {
                            $pg = $pglook;
                            break;
                        }
                    }
                }
            }
        }
        if ($pg !== null && $pg !== '') {
            htmlhead($mcerr, false, null, $pg);
            showcustompage($pg, $mcerr);
            return;
        }
    }
    if ($pagesonly === true) {
        onlylogin();
        return;
    }
    if (count($rigs) == 1) {
        $parts = explode(':', $rigs[0], 3);
        if (count($parts) >= 2) {
            $miner = $parts[0];
            $port = $parts[1];
            htmlhead($mcerr, true, 0);
            doOne(0, $preprocess);
        } else {
            minhead($mcerr);
            otherrow('<td class=bad>Invalid "$rigs" array</td>');
        }
        return;
    }
    if ($rig != null and $rig != '' and $rig >= 0 and $rig < count($rigs)) {
        $parts = explode(':', $rigs[$rig], 3);
        if (count($parts) >= 2) {
            $miner = $parts[0];
            $port = $parts[1];
            htmlhead($mcerr, true, 0);
            doOne($rig, $preprocess);
        } else {
            minhead($mcerr);
            otherrow('<td class=bad>Invalid "$rigs" array</td>');
        }
        return;
    }
    htmlhead($mcerr, false, null);
    if ($placebuttons == 'top' || $placebuttons == 'both') {
        pagebuttons(null, null);
    }
    if ($preprocess != null) {
        process(array($preprocess => $preprocess), $rig);
    }
    newtable();
    doforeach('version', 'rig summary', array(), array(), true);
    $sum = array('MHS av', 'Getworks', 'Found Blocks', 'Accepted', 'Rejected', 'Discarded', 'Stale', 'Utility', 'Local Work', 'Total MH', 'Work Utility', 'Diff1 Shares', 'Diff1 Work', 'Difficulty Accepted', 'Difficulty Rejected', 'Difficulty Stale');
    doforeach('summary', 'summary information', $sum, array(), false);
    endtable();
    otherrow('<td><br><br></td>');
    newtable();
    doforeach('devs', 'device list', $sum, array('' => '', 'ID' => '', 'Name' => ''), false);
    endtable();
    otherrow('<td><br><br></td>');
    newtable();
    doforeach('pools', 'pool list', $sum, array('' => ''), false);
    endtable();
    if ($placebuttons == 'bot' || $placebuttons == 'both') {
        pagebuttons(null, null);
    }
}
开发者ID:vehre,项目名称:neo-gpuminer,代码行数:101,代码来源:miner.php


示例12: individualStatsByBrowser

function individualStatsByBrowser($pid = '', $type = 'hits', $tableWidth = '100%')
{
    global $browserArray, $CONFIG, $lang_stat_details_php, $icon_array;
    $maxBarWidth = 200;
    if (GALLERY_ADMIN_MODE == true) {
        foreach ($browserArray as $key => $value) {
            $query = "SELECT COUNT(*) FROM ";
            if ($type == 'vote') {
                $query .= $CONFIG['TABLE_VOTE_STATS'];
            } else {
                $query .= $CONFIG['TABLE_HIT_STATS'];
            }
            $query .= " WHERE browser = '{$key}'";
            if ($pid != '') {
                $query .= " AND pid='{$pid}'";
            }
            // Now this is a very crude way to query the database which is bound to overload larger galleries. Should be reviewed!
            $result = cpg_db_query($query);
            $row = mysql_fetch_array($result);
            if ($row[0] != 0) {
                $browserResultArray[$key] = $row[0];
            }
        }
        array_multisort($browserResultArray, SORT_DESC);
        $browserTotal = array_sum($browserResultArray);
        print '<a name="browser"></a>';
        starttable($tableWidth, $icon_array['browser'] . $lang_stat_details_php['stats_by_browser'], 3);
        print <<<EOT
        <tr>
          <td class="tableh2" colspan="2">{$lang_stat_details_php['browser']}</td>
          <td class="tableh2" align="left">{$lang_stat_details_php['number_of_hits']} (%)</td>
        </tr>
EOT;
        $loopCounter = 0;
        foreach ($browserResultArray as $key => $value) {
            $individualBarWidth = floor($value * $maxBarWidth / $browserTotal);
            $individualPercentage = floor($value * 1000 / $browserTotal) / 10;
            if ($individualPercentage == floor($individualPercentage)) {
                $individualPercentage .= '.0';
            }
            if ($loopCounter == 0) {
                $row_style_class = 'tableb';
                $loopCounter++;
            } else {
                $row_style_class = 'tableb tableb_alternate';
                $loopCounter = 0;
            }
            print <<<EOT
          <tr>
            <td class="{$row_style_class}" width="20"><img src="images/browser/{$browserArray[$key]}" width="14" height="14" border="0" title="{$key}" alt="" /></td>
            <td class="{$row_style_class}">{$key}</td>
            <td class="{$row_style_class}" align="left">
EOT;
            print theme_display_bar($value, $browserTotal, 200, '', '', ' (' . $individualPercentage . ' %)');
            print <<<EOT
            </td>
          </tr>
EOT;
        }
        print <<<EOT
        <tr>
          <td class="tablef" colspan="2">{$lang_stat_details_php['total']}</td>
          <td class="tablef" align="left">{$browserTotal}</td>
        </tr>
EOT;
        endtable();
        print '<br />';
    }
}
开发者ID:CatBerg-TestOrg,项目名称:coppermine_1.6.x,代码行数:69,代码来源:stats.inc.php


示例13: slideshow

function slideshow()
{
    global $CONFIG, $template_display_picture, $CPG_M_DIR;
    if (function_exists('theme_slideshow')) {
        theme_slideshow();
        return;
    }
    pageheader(SLIDESHOW_TITLE);
    require_once "includes/coppermine/slideshow.inc";
    $start_slideshow = '<script language="JavaScript" type="text/JavaScript">runSlideShow()</script>';
    template_extract_block($template_display_picture, 'img_desc', $start_slideshow);
    $params = array('{CELL_HEIGHT}' => $CONFIG['picture_width'] + 100, '{IMAGE}' => '<img src="' . $start_img . '" name="SlideShow" class="image" alt="" /><br />', '{ADMIN_MENU}' => '');
    starttable();
    echo template_eval($template_display_picture, $params);
    endtable();
    starttable();
    echo '
		<tr>
		<td style="text-align:center"  class="navmenu" style="white-space: nowrap;">
		<a href="javascript:endSlideShow()" class="navmenu">' . STOP_SLIDESHOW . '</a>
		</td>
		</tr>
';
    endtable();
    pagefooter();
}
开发者ID:cbsistem,项目名称:nexos,

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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