messagenew.php
<?php
function begin_special_page()
{
require_once XOOPS_MODULE_PATH . '/legacy/kernel/Legacy_Module.class.php';
$handler =& xoops_gethandler('module');
$module =& $handler->getByDirname('legacy');
$root =& XCube_Root::getSingleton();
$root->mContext->mModule =& new Legacy_ModuleAdapter($module);
$root->mContext->mModule->mXoopsModule =& $module;
$root->mContext->mXoopsModule =& $module;
}
include_once "/mainfile.php";
include_once XOOPS_ROOT_PATH."/header.php";
begin_special_page();
?>
/*message_new.htmlの内容*/
<h3><{$smarty.const._MD_MESSAGE_TEMPLATE1}></h3>
<script type="text/javascript">
<!--
function check(){
var flag = 0;
// 設定開始(必須にする項目を設定してください)
if(document.messageform.uname.value == ""){ // 「お名前」の入力をチェック
flag = 1;
}
else if(document.messageform.note.value == ""){ // 「本文」の入力をチェック
flag = 2;
}
else if(document.messageform.ote.value == ""){
flag = 3;
}
// 設定終了
switch(flag){
case 1:
window.alert('タイトルを入力してください');
return false;
case 2:
window.alert('本文を入力してください');
return false;
case 2:
window.alert('件名を入力してください');
return false;
}
}
// -->
</script>
<{if $errMsg!=""}>
<ul>
<{foreach item=error from=$errMsg}>
<li style="color:red; font-weight: bold;"><{$error}></li>
<{/foreach}>
</ul>
<{/if}>
<form action="<{$xoops_url}>/modules/message/index.php?action=new" method="post" onSubmit="return check()">
<{xoops_token form=$mActionForm}>
<{xoops_input type=hidden name=mode}>
<table class="outer">
<tr><td class="head"><{$smarty.const._MD_MESSAGE_TEMPLATE2}></td><td class="even" style="float:left"><{xoops_input name=uname size=30 maxlength=50 value=$mActionForm->get('uname')}></td></tr>
<tr><td class="head"><{$smarty.const._MD_MESSAGE_TEMPLATE3}></td><td class="even" style="float:left"><{xoops_input name=title size=50 maxlength=100 value=$mActionForm->get('title')}></td></tr>
<tr><td class="head"><{$smarty.const._MD_MESSAGE_TEMPLATE4}></td><td class="even"><{xoops_dhtmltarea cols=60 rows=7 name=note value=$mActionForm->get('note')}></td></tr>
<tr><td class="foot" colspan="2" align="center">
<{legacy_button id=Submit Text=$smarty.const._MD_MESSAGE_TEMPLATE6}></td></tr>
</table>
</form>
<?php
include_once XOOPS_ROOT_PATH."/footer.php";
?>
Deprecated: Assigning the return value of new by reference is deprecated in /home/sknpw3925/parallelworld.me/public_html/messagenew.php on line 11
Warning: include_once(/mainfile.php): failed to open stream: No such file or directory in /home/sknpw3925/parallelworld.me/public_html/messagenew.php on line 16
Warning: include_once(): Failed opening '/mainfile.php' for inclusion (include_path='.:') in /home/sknpw3925/parallelworld.me/public_html/messagenew.php on line 16
Warning: include_once(XOOPS_ROOT_PATH/header.php): failed to open stream: No such file or directory in /home/sknpw3925/parallelworld.me/public_html/messagenew.php on line 17
Warning: include_once(): Failed opening 'XOOPS_ROOT_PATH/header.php' for inclusion (include_path='.:') in /home/sknpw3925/parallelworld.me/public_html/messagenew.php on line 17
Warning: require_once(XOOPS_MODULE_PATH/legacy/kernel/Legacy_Module.class.php): failed to open stream: No such file or directory in /home/sknpw3925/parallelworld.me/public_html/messagenew.php on line 5
Fatal error: require_once(): Failed opening required 'XOOPS_MODULE_PATH/legacy/kernel/Legacy_Module.class.php' (include_path='.:') in /home/sknpw3925/parallelworld.me/public_html/messagenew.php on line 5
エラーだらけ・・・