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


PHP Dialog::Dialog方法代码示例

本文整理汇总了PHP中Dialog::Dialog方法的典型用法代码示例。如果您正苦于以下问题:PHP Dialog::Dialog方法的具体用法?PHP Dialog::Dialog怎么用?PHP Dialog::Dialog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dialog的用法示例。


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

示例1: LoginDialog

        function LoginDialog($message='') {
            parent::Dialog('login', guil('dialog_login_title'), '', 1, 1);

            $html  = "<p>".guil('dialog_login_useforumacc')."</p>
                <form action='' method='POST'>
                    <table>
                        <tr><td>".guil('username').":</td><td><input type='text' name='username'></td></tr>
                        <tr><td>".guil('password').":</td><td><input type='password' name='password'></td></tr>
                        <tr><td>".guil('preferedlanguage').":</td><td>
                            <select name='language' onChange='document.location.href=\"?op=setlanguage&language=\"+this.value'>";
            foreach(array('de' => 'Deutsch', 'en' => 'English') as $short => $long) {
                if($_SESSION['language'] == $short) {
                    $selected = "selected='selected'";
                } else {
                    $selected = "";
                }
                $html .= "<option value='".$short."' ".$selected.">".$long."</option>";
            }
            $html .= "</select>
                            </td></tr>
                            <tr><td colspan='2' align='center'><input type='submit' value='".guil('login')."'></td></tr>
                        </table>";
            if($login_message) {
                $html .= "<p style='color:red; text-align:center'>".$message."</p>";
            }
            $html .= "<input type='hidden' name='op' value='login'>
                    </form>
                    <p><a href='/forum/ucp.php?mode=register'>".guil('register')."</a> <a href='?op=demo'>".guil('startdemo')."</a></p>";

            $this->nobutton = 1;
            $this->content = $html;
        }
开发者ID:nesges,项目名称:Batalyser,代码行数:32,代码来源:class.logindialog.php

示例2: HelpDialog

 function HelpDialog() {
     parent::Dialog('help', guil('dialog_help_title'), '', 1, 0);
     
     $html = "<img src='http://geekandpoke.typepad.com/.a/6a00d8341d3df553ef014e8b8f1c5b970d-800wi' alt=''>";
     
     $this->content = $html;
     $this->nobutton = 1;
 }
开发者ID:nesges,项目名称:Batalyser,代码行数:8,代码来源:class.helpdialog.php

示例3: MessageDialog

        function MessageDialog($message, $title, $returnto='') {
            parent::Dialog('message', $title, '', 1, 1);
            
            if(!$returnto) {
                $returnto = $this->jsclose();
                $backbuttontext = guil('close');
            } elseif($returnto=='back') {
                $returnto = 'document.location.href="?op=noop"';
                $backbuttontext = guil('back');
            } else {
                $backbuttontext = guil('back');
            }

            $html = "<p>$message</p><center><button onClick=\"".$returnto."\">".$backbuttontext."</button></center>";
            
            $this->content = $html;
            $this->important = 1;
            $this->nobutton = 1;
            unset($this->width);
            unset($this->position);
        }
开发者ID:nesges,项目名称:Batalyser,代码行数:21,代码来源:class.messagedialog.php

示例4: CharmanagerDialog

 function CharmanagerDialog() {
     parent::Dialog('charmanager', guil('yourchars'), '', 1);
 }
开发者ID:nesges,项目名称:Batalyser,代码行数:3,代码来源:class.charmanagerdialog.php

示例5: CharassignDialog

        function CharassignDialog() {
            global $userchars, $logfiles, $sql;
            
            parent::Dialog('charassign', guil('assignyourchars'), '', 1);
            $parser = new Parser();

            $userchars_in_parser = 0;
            foreach($userchars as $userchar_id => $userchar) {
                $userchar_names[] = $userchar['name'];
                if(in_array($userchar['name'], array_keys($parser->players))) {
                    $userchars_in_parser++;
                }
            }

            if($userchars_in_parser) {
                $html = '<p>'.guil('assignyourchars_note').'. '.guil('createchars_note').'</p>
                    <form action="" method="POST">
                        <table>';
                foreach(array_keys($parser->players) as $logchar) {
                    if(in_array($logchar, $userchar_names)) {
                        $html .= '<tr><td>'.$logchar.' ist </td><td><select name="selectchar['.$logchar.']"><option value="-1"></option>';
                        foreach($userchars as $userchar_id => $userchar) {
                            if($userchar['name'] == $logchar) {
                                $selected = 'selected="selected"';
                            } else {
                                $selected = '';
                            }
                            $html .= '<option '.$selected.' value="'.$userchar_id.'">'.$userchar['name'].' ('.$userchar['class'].'/'.$userchar['server'].')</option>';
                        }
                        $html .= '</select></td></tr>';
                    }
                }
                $html .= '</table>
                        <input type="hidden" name="op" value="charassign">
                        <center><input type="submit" value="'.guil('saveassignment').'"></center>
                    </form>';
            } else {
                $html = '<p>'.guil('noneofyourcharsfound').' '.guil('createchars_note').'</p>';
            }
            
            if(count($logfiles[$_SESSION['log_id']]['chars'])>0) {
                $html .= '<p>Aktuell zugeordnet:</p><ul>';
                foreach($logfiles[$_SESSION['log_id']]['chars'] as $logfile_char) {
                    if(isset($userchars[$logfile_char['id']])) {
                        // own log, own char
                        $charname = $userchars[$logfile_char['id']]['name'];
                        $classname = $userchars[$logfile_char['id']]['class'];
                        $servername = $userchars[$logfile_char['id']]['server'];
                    } else {
                        // public log, others char
                        $res = $sql['main']->query("select c.name,
                                                    coalesce(cl.".$_SESSION['language'].", cl.de, cl.en, cl.fr, cl.other),
                                                    s.name
                                                    from `char` c
                                                        join class cl on (cl.class_id = c.class_id)
                                                        join server s on (s.id = c.server_id)
                                                        where c.id='".$logfile_char['id']."'");
                        list($charname, $classname, $servername) = $sql['main']->fetch_row($res);
                    }
                    $html .= '<li>"'.$logfile_char['name'].'" ist "'.$charname.' ('.$classname.'/'.$servername.')"</li>';
                }
                $html .= '</ul>';
            }

            $this->content = $html;
        }
开发者ID:nesges,项目名称:Batalyser,代码行数:66,代码来源:class.charassigndialog.php

示例6: OptionsDialog

        function OptionsDialog($message='') {
            global $demo, $logfiles, $languages, $openOptions, $userchars, $sql;
            
            parent::Dialog('options', guil('dialog_options_title'), '', 1, 1);
            
            $disable_ui_element="";
            if($demo) {
                $disable_ui_element = "disabled='disabled'";
            }

            $html = "<div id='accordion_options'>
                        <h3><a href='#'>".guil('view')."</a></h3>
                        <div>
                            <form action='' method='GET'>
                                <table width='100%'>
                                    <tr>
                                        <td nowrap='nowrap'>".guil('view_chooselogfile').":</td>
                                        <td colspan='2'><select name='logfile'>";
                                        if($logfiles) {
                                            foreach($logfiles as $logfile_id => $logfile) {
                                                $selected = "";
                                                if(isset($_SESSION['log_id']) && $logfile_id == $_SESSION['log_id']) {
                                                    $selected = " selected='selected' ";
                                                }
                                                $html .= "<option $selected value='".$logfile_id."'>".$logfile['notes']."</option>";
                                            }
                                        }
                                        $html .= "</select></td>
                                    </tr>
                                    <tr>
                                        <td nowrap='nowrap'>".guil('minfightduration').":</td>
                                        <td width='70%'><div id='min_fight_duration_slider'></div></td>
                                        <td><input type='text' id='min_fight_duration_slider_value' name='min_fight_duration' value='' style='width:3em' readonly='readonly'></td>
                                    </tr>
                                    <tr>
                                        <td>".guil('preferedlanguage').":</td>
                                        <td>
                                            <select name='prefered_language'>";
                                                foreach($languages as $short => $long) {
                                                    $selected = "";
                                                    if($short == $_SESSION['language']) {
                                                        $selected = "selected='selected'";
                                                    }
                                                    $html .= "<option $selected value='$short'>$long</option>";
                                                }
                                            $html .= "</select>
                                        </td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td colspan='3' align='right'><input type='submit' value='".guil('viewlogwiththissettings')."'></td>
                                    </tr>
                                </table>
                                <input type='hidden' name='op' value='setopt'>
                            </form>
                        </div>";
        
            if($_SESSION['user_id']) {
                $html .= "<h3><a href='#'>".guil('upload')."</a></h3>
                        <div>
                            <form action='' method='POST' enctype='multipart/form-data' name='uploadform'>
                                <input type='hidden' name='MAX_FILE_SIZE' value='".MAX_FILE_SIZE."'>
        
                                <table>
                                    <tr>
                                        <td colspan='2'>".guil('zipfilenotice')."</td>
                                    </tr>
                                    <tr>
                                        <td colspan='2'>
                                            ".guil('logfile').": (max. ".sprintf("%s", 1024 * (MAX_FILE_SIZE / pow(1024, floor((strlen(MAX_FILE_SIZE) - 1) / 3))))."kB): <input type='file' name='logfile'>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>".guil('logpublicize')."</td>
                                        <td><input type='checkbox' name='publicize' checked='checked'></td>
                                    </tr>
                                    <!--tr>
                                        <td>".guil('logmergeable')."</td>
                                        <td><input type='checkbox' name='mergeable' checked='checked'></td>
                                    </tr-->
                                </table>
                                <p style='text-align:right'><input type='submit' value='".guil('startupload')."' id='button_start_upload' onClick='document.uploadform.submit()' $disable_ui_element>";
                                if($demo) {
                                    $html .= "<div style='text-align:right'><small>".guil('upload_demonotice')."</small></div>";
                                }
                                $html .= "
                                <input type='hidden' name='op' value='logupload'>
                            </form>
                        </div>";
                }
        
                if($logfiles && $_SESSION['user_id']) {
                    $html .= "<h3><a href='#'>".guil('availablelogs')."</a></h3>
                    <div>
                        <p>".guil('yourlogs').":</p>
                        <form action='' method='POST'>
                            <table class='dataTableAutoWidth' id='datatable_optionsLogfiles'>
                                <thead>
                                    <tr>
                                        <th></th>
//.........这里部分代码省略.........
开发者ID:nesges,项目名称:Batalyser,代码行数:101,代码来源:class.optionsdialog.php


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