Example #1
0
 /**
  * Retrieves the HTML string.
  *
  * @return string
  */
 public function toHtml()
 {
     $dialog = new Dialog();
     $dialog->bottom = new Bar();
     $dialog->center = $this->content;
     $dialog->bottom->right = $this->cancel->toHtml() . $this->confirm->toHtml();
     $this->content = $dialog->toHtml();
     return parent::toHtml();
 }
Example #2
0
 protected function getQueryData()
 {
     $data = parent::getQueryData();
     $dialogData = array('id' => $this->id);
     $data = array_merge($data, $dialogData);
     return $data;
 }
Example #3
0
 function onTestCreate($packet)
 {
     $server = $packet->content;
     $view = $this->tpl();
     $view->assign('server', $server);
     Dialog::fill($view->draw('_groups_add', true));
 }
 public function init()
 {
     if (empty($this->buttons)) {
         $this->buttons = [CloseButton::className(), SubmitButton::className()];
     }
     parent::init();
 }
Example #5
0
        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;
        }
Example #6
0
 protected function getQueryData()
 {
     $data = parent::getQueryData();
     if (!empty($this->permissions)) {
         $data['scope'] = implode(',', $this->permissions);
     }
     return $data;
 }
Example #7
0
 public static function BtnDeleteRecord()
 {
     if (Controller::ExecuteNonQuery($query_name_delete, $params)) {
         Dialog::RequestRecordDeleted();
     } else {
         Dialog::RequestError();
     }
 }
Example #8
0
 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;
 }
Example #9
0
File: Rooms.php Project: Trim/movim
 /**
  * @brief Display the room list
  */
 function ajaxList($room)
 {
     if (!$this->validateRoom($room)) {
         return;
     }
     $view = $this->tpl();
     $cd = new \Modl\ContactDAO();
     $view->assign('list', $cd->getPresences($room));
     Dialog::fill($view->draw('_rooms_list', true), true);
 }
Example #10
0
 protected function compileDialog()
 {
     $dialog = $this->getDialog();
     foreach ($dialog as $sectionId => $section) {
         if (!is_array($section)) {
             $sect = preg_split("/[_\\.:]/", $section);
             switch ($sect[0]) {
                 case self::MIXIN:
                     $newDialog = new Dialog($sect[1]);
                     $mixin = $newDialog->getDialog();
                     $dialog = array_merge($dialog, $mixin);
                     break;
                 case self::PLUGIN:
                     break;
             }
         }
     }
     return $dialog;
 }
Example #11
0
 protected function getQueryData()
 {
     $data = parent::getQueryData();
     $dialogData = array('action' => $this->action, 'order_info' => json_encode($this->orderInfo), 'dev_purchase_params' => $this->getDisplayLocalCurrency());
     if ($this->product !== null) {
         $dialogData['product'] = $this->product;
     }
     $data = array_merge($data, $dialogData);
     return $data;
 }
Example #12
0
 protected function FetchByKey($bo_no)
 {
     $retult = $this->Sql('fetch_key', $bo_no);
     if (!$this->board[$retult['bo_id']]) {
         $this->board[$retult['bo_id']] = $retult;
     }
     if (!$this->board[$retult['bo_id']]) {
         Dialog::Alert('게시판 번호가 잘못 됐습니다.');
     }
     return $this->board[$retult['bo_id']];
 }
Example #13
0
 function onCommand($package)
 {
     $command = $package->content;
     $view = $this->tpl();
     if (isset($command->note)) {
         $view->assign('note', $command->note);
         Dialog::fill($view->draw('_adhoc_note', true));
     }
     if (isset($command->x)) {
         $xml = new \XMPPtoForm();
         $form = $xml->getHTML($command->x->asXML());
         $view->assign('form', $form);
         $view->assign('attributes', $command->attributes());
         $view->assign('actions', null);
         if (isset($command->actions)) {
             $view->assign('actions', $command->actions);
         }
         Dialog::fill($view->draw('_adhoc_form', true), true);
     }
     RPC::call('AdHoc.initForm');
 }
Example #14
0
        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);
        }
 function CharmanagerDialog() {
     parent::Dialog('charmanager', guil('yourchars'), '', 1);
 }
Example #16
0
<?php

if (!defined("__MAGIC__")) {
    exit;
}
$key = GV::Number($this->KN());
$file = $this->Sql('fetch', $key);
$path = Path::Group($file['file_path']);
// 무단 링크 검사
// 무단링크시에는 hotlink.gif이미지를 뿌려준다.
$check_hotlink = GV::String(File::hotlink);
if (!$check_hotlink || $_SESSION[File::hotlink] != $check_hotlink) {
    $path = Path::img('hotlink.gif');
}
if (file_exists($path)) {
    header("content-type: {$file['file_type']}");
    header("content-length: " . filesize($path));
    header("pragma: no-cache");
    header("expires: 0");
    flush();
    $fp = fopen($path, "rb");
    while (!feof($fp)) {
        echo fread($fp, 100 * 1024);
        flush();
    }
    fclose($fp);
    flush();
} else {
    Dialog::Alert("파일을 찾을 수 없습니다.");
}
exit;
Example #17
0
if (!$clear['mb_email']) {
    Dialog::alert("이메일 주소를 입력하세요.");
}
if ($clear['mb_passwd'] != $_POST['confirm_passwd']) {
    Dialog::alert("비밀번호 확인이 일치하지 않습니다.");
}
$clear['mb_passwd'] = $this->Sql('password', $clear['mb_passwd']);
$clear['mb_datetime'] = 'NOW()';
$clear['mb_level'] = '2';
$tbn = $this->TBN();
$sql = "\n  SELECT\n    mb_id,\n    mb_nick,\n    mb_name,\n    mb_email\n    FROM {$tbn}\n  WHERE\n    mb_id='{$clear['mb_id']}' OR\n    mb_nick='{$clear['mb_nick']}' OR\n    mb_name='{$clear['mb_name']}' OR\n    mb_email='{$clear['mb_email']}'\n  LIMIT 1\n";
$dup = DB::Get()->sql_fetch($sql);
if ($duplication !== false) {
    if ($dup['mb_id'] == $clear['mb_id']) {
        Dialog::alertNReplace("동일한 회원아이디가 있습니다.", Path::Group());
    }
    if ($dup['mb_nick'] == $clear['mb_nick']) {
        Dialog::alertNReplace("동일한 회원닉네임이 있습니다.", Path::Group());
    }
    if ($dup['mb_name'] == $clear['mb_name']) {
        Dialog::alertNReplace("동일한 회원이름이 있습니다.", Path::Group());
    }
    if ($dup['mb_email'] == $clear['mb_email']) {
        Dialog::alertNReplace("동일한 이메일 주소가 있습니다.", Path::Group());
    }
} else {
    // 회원정보 입력
    $this->Sql('insert', $clear);
    Dialog::alertNReplace("회원가입을 환영합니다.\n가입하신 아이디와 비밀번호로 로그인하세요.", Path::Group());
}
exit;
<?php

if (!defined("__MAGIC__")) {
    exit;
}
$mb_id = GV::Id('mb_id', 'POST');
if (Config::Inst('config.php')->admin == $mb_id) {
    Dialog::Alert("최고관리자는 질문 답변으로 비밀번호를 찾을수 없습니다.");
}
$ret = $this->Sql('fetch_by_id', $mb_id);
if (!$ret['mb_question']) {
    Dialog::alert("비밀번호 찾기 질문을 등록하지 않았습니다.\n질문 답변으로 비밀번호를 찾을수 없습니다.\n관리자에게 문의하세요.", Path::Group());
}
Example #19
0
if (!defined("__MAGIC__")) {
    exit;
}
// 게시판 생성
if ($_POST['bo_no'] == '') {
    $data['bo_subject'] = GV::String('bo_subject');
    $_POST['bo_no'] = Board::Inst()->Action('insert_record', $data);
    unset($_POST['bo_subject']);
}
if (!$_POST['list_view']) {
    $_POST['list_view'] = 0;
}
if (!$_POST['show_notice']) {
    $_POST['show_notice'] = 0;
}
if (!$_POST['use_comment']) {
    $_POST['use_comment'] = 0;
}
$data = Widget::Inst()->Action('data_implode', $_POST);
$key = DB::Get()->InsertEx($this->TBN(), $data);
if (!$key) {
    Dialog::Alert('정확한 정보를 입력하세요.');
}
Widget::Inst()->Action('add_widget', $key);
?>
<script>
window.opener.location.reload();
window.close();
</script>
<?php 
exit;
Example #20
0
<?php

if (!defined("__MAGIC__")) {
    exit;
}
$tbn = $this->TBN();
// 테이블명
$clear = $this->Clear();
$r = GV::String('r');
$id1 = GV::String('id1');
$id2 = GV::String('id2');
$clear['bo_admin_path'] = Url::Get(array('r' => $r, 'id1' => $id1, 'id2' => $id2, 'bo_no' => $clear['bo_no'], $this->Mode('name') => 'write'));
$this->Action('insert_record', $clear);
Dialog::Alert("게시판 추가 완료!", $this->Link('list'));
Example #21
0
 function ajaxOpenDialog()
 {
     Dialog::fill($this->preparePresenceList());
     RPC::call('Presence.refresh');
 }
<?php

if (!defined("__MAGIC__")) {
    exit;
}
/*
 * action파일
 * action.*.php 파일은 Alert을 호출하지 않고 단순한 하나의 행동을하고
 * 결과 값을 알려준다.
 * $result에 결과값을 저장해 줌
 * --------------------------
 * 해당 개시글이 새로운 글인지 검사함
 * $att[1] 첫번째 파라메터는 삭제할 파일번호다.
 */
$tbn = $this->TBN();
// 테이블명
$clear = $att[1];
unset($clear['bo_no']);
///< 게시판 번호는 자동생성
if (!$clear['bo_subject']) {
    Dialog::alert('게시판 명을 입력하세요.');
}
foreach ($this->Config('default') as $k => $v) {
    if (!isset($clear[$k])) {
        $clear[$k] = $v;
    }
}
$result = DB::Get()->insertEx($tbn, $clear);
<?php

if (!defined("__MAGIC__")) {
    exit;
}
$m = $this->Sql('fetch', GV::Number($this->KN()));
if (Config::Inst()->admin == $m['mb_id']) {
    Dialog::Alert("최고관리자는 질문 답변으로 비밀번호를 찾을수 없습니다.");
}
if ($m['mb_answer'] != $_POST['mb_answer']) {
    Dialog::Alert('답변이 틀렸습니다.');
} else {
    $new_passwd = '';
    for ($i = 0; $i <= 7; $i++) {
        $new_passwd .= substr('23456789abcdef', rand(0, 13), 1);
    }
    $this->Sql('change_password', $m['mb_no'], $new_passwd);
    // 비밀번호 바꾸고 바뀐 비밀번호 알려주기
    Dialog::alertNReplace("임시 비밀번호는 {$new_passwd} 입니다.\n개인정보에서 꼭 비밀번호를 변경하세요.", $this->Link('login'));
}
Example #24
0
File: Chat.php Project: Trim/movim
 /**
  * @brief Get the subject form of a chatroom
  */
 function ajaxGetSubject($room)
 {
     if (!$this->validateJid($room)) {
         return;
     }
     $view = $this->tpl();
     $md = new \Modl\MessageDAO();
     $s = $md->getRoomSubject($room);
     $view->assign('room', $room);
     $view->assign('subject', $s);
     Dialog::fill($view->draw('_chat_subject', true));
 }
Example #25
0
if($_POST['ca1']) $clear['wr_category'][] = $_POST['ca1']; 
if($_POST['ca2']) $clear['wr_category'][] = $_POST['ca2']; 
$clear['wr_category'] = implode('|',$clear['wr_category']); 


// 회원이면 자신의 회원번호를 입력함
if($this->Config('mb','login')) $clear['mb_no'] = $this->Config('mb','no');
// 기본 정보들 자동입력
$clear['wr_datetime'] = 'NOW()';
$clear['wr_update'] = 'NOW()';
$clear['wr_ip'] = "INET_ATON('".Util::GetRealIPAddr()."')";
$clear['bo_no'] = $bo_no;


$key = DB::Get()->InsertEx($tbn, $clear, array('wr_ip','wr_datetime','wr_update'));
if(!$key) Dialog::Alert('정확한 정보를 입력하세요.');

// 태그 입력
$tags = $_POST['tags'];
if($tags) {
  Tag::Inst()->Action('insert', $bo_no, $key, array_unique(array_filter(explode(',', $tags))));
}

// 파일 업로드
File::Inst()->Action('upload', $key);

$url = $this->Link('view', $key);
if($clear['wr_is_secret']) $url = $this->Link('list');

Url::GoReplace($url);
Example #26
0
File: Post.php Project: vijo/movim
 function ajaxDelete($to, $node, $id)
 {
     $view = $this->tpl();
     $view->assign('to', $to);
     $view->assign('node', $node);
     $view->assign('id', $id);
     Dialog::fill($view->draw('_post_delete', true));
 }
Example #27
0
 /**
  * If there is no rows for the view the script stops and send a message to the client.
  * @param array $view
  * @return void
  */
 private static function HasRowsViewDie($view)
 {
     if (count($view) == 0) {
         Dialog::RequestError("The view " . $view_name . " doesn't exist!");
     }
 }
Example #28
0
 function ajaxHelp()
 {
     $view = $this->tpl();
     Dialog::fill($view->draw('_publish_help', true), true);
 }
Example #29
0
File: Group.php Project: vijo/movim
 function ajaxAskUnsubscribe($server, $node)
 {
     if (!$this->validateServerNode($server, $node)) {
         return;
     }
     $view = $this->tpl();
     $view->assign('server', $server);
     $view->assign('node', $node);
     $pd = new \Modl\ItemDAO();
     $item = $pd->getItem($server, $node);
     if (isset($item)) {
         $view->assign('item', $item);
     } else {
         $view->assign('item', null);
     }
     Dialog::fill($view->draw('_group_unsubscribe', true));
 }
Example #30
0
 function ajaxDeleteContact($jid)
 {
     if (!$this->validateJid($jid)) {
         return;
     }
     $view = $this->tpl();
     $view->assign('jid', $jid);
     Dialog::fill($view->draw('_contact_delete', true));
 }