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


PHP xajaxResponse::insert方法代码示例

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


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

示例1: openPopup


//.........这里部分代码省略.........
            break;
        case 'profile_settings':
            $project7 = new editsee_App();
            $username = $_SESSION['username'];
            $query = $project7->db->_query("select email from " . $project7->db->get_table_prefix() . "user where user_id='" . $_SESSION['user_id'] . "'");
            $email = $query->_result(0);
            $popup_title = 'Profile Settings';
            $popup_contents = <<<PROFILESETTINGS
\t<form id="editsee_profile_settings">
\t<table>
\t<tr><td>Username:</td><td><input type="text" id="username" value="{$username}" /></td></tr>
\t<tr><td>E-mail Address</td><td><input type="text" id="email" value="{$email}" /></td></tr>
\t<tr><td colspan="2" class="submit">
\t<input type="submit" value="save profile" onclick="xajax_profileSettings(
\t\t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('username').value
\t\t\t\t\t\t\t\t\t\t\t\t\t,document.getElementById('email').value
\t\t\t\t\t\t\t\t\t\t\t\t); return false;" />
PROFILESETTINGS;
            break;
        case 'forgot_password':
            $project7 = new editsee_App();
            $popup_title = 'Forgot Password';
            $popup_contents = <<<FORGOTPASSWORD
\t<form id="editsee_forgot_password">
\t<table>
\t<tr><td>Username/E-mail Address:</td><td><input type="text" id="information" /></td></tr>
\t<tr><td colspan="2" class="submit">
\t<input type="submit" value="reset password" onclick="xajax_forgotPassword(
\t\t\t\t\t\t\t\t\t\t\t\t\tdocument.getElementById('information').value
\t\t\t\t\t\t\t\t\t\t\t\t); return false;" />
FORGOTPASSWORD;
            break;
        case 'new_category':
            $popup_title = 'New Category';
            $popup_contents = <<<NEWCAT
\t\t<form id="editsee_new_category">
\t\t<table>
\t\t<tr><td>Category:</td><td><input type="text" id="category" /></td></tr>
\t\t<tr><td colspan="2" class="submit">
\t\t<input type="submit" value="add category" onclick="xajax_newCategory(document.getElementById('category').value); return false;" />\t\t
NEWCAT;
            break;
        case 'custom_footer':
            $project7 = new editsee_App();
            $query = $project7->db->_query("select data from " . $project7->db->get_table_prefix() . "custom where section='footer' and label='Custom Footer'");
            if ($query->_num_rows() == 1) {
                $custom_footer = stripslashes($query->_result(0));
            }
            $popup_title = 'Custom Footer';
            $popup_contents = <<<CUSTOMFOOTER
\t<form id="custom_footer">
\t<table>
\t<tr><td>
\t\t\t<input type="hidden" id="custom_section" value="footer" />
\t\t\t<input type="hidden" id="custom_label" value="Custom Footer" />
\t\t\t<textarea id="custom_footer_code" style="width:300px !important;" rows="20">{$custom_footer}</textarea>
\t</tr</td>
\t<tr><td colspan="2" class="submit"><input type="submit" value="save footer" onclick="xajax_customSection(document.getElementById('custom_section').value
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,document.getElementById('custom_label').value
\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t,document.getElementById('custom_footer_code').value); return false;" />
CUSTOMFOOTER;
            break;
        case 'manage_users':
            $project7 = new editsee_App();
            $user_list = $project7->get_users('<tr>', '<td>data</td>', '</tr>');
            $popup_title = 'Manage Users';
            $popup_contents = <<<MANUSERS
\t\t<form id="editsee_manage_users">
\t\t<h2>Exiting Users</h2>
\t\t<table id="user_list">
\t\t<tr><td>Username</td><td>Email</td><td>Role</td><td>&nbsp;</td></tr>
\t\t{$user_list}
\t\t</table>
\t\t<h2>Add New User</h2>
\t\t<table>
\t\t<tr><td>Username:</td><td><input type="text" id="name" /></td></tr>
\t\t<tr><td>Password:</td><td><input type="password" id="password" /></td></tr>
\t\t<tr><td>Email:</td><td><input type="text" id="email" /></td></tr>
\t\t<tr><td>Role:</td><td><select id="role"><option value="poster">Poster</option><option value="author">Author</option><option value="admin">Admin</option></select></td></tr>
MANUSERS;
            $popup_contents .= '
			<tr><td colspan="2"><img src="' . $project7->get_config('es_main_url') . 'includes/layout/images/user_add.png" ';
            $popup_contents .= <<<MANUSERS
\t\tonclick="xajax_newUser(document.getElementById('name').value,(document.getElementById('role').options[document.getElementById('role').selectedIndex]).value,document.getElementById('password').value,document.getElementById('email').value); return false;" alt="Add User" title="Add User"/></td>
\t\t</tr>
\t\t<tr><td colspan="2" class="submit">\t
MANUSERS;
            break;
        default:
            $popup_title = ucwords(str_replace('_', ' ', $popup));
            $popup_contents .= '<p>This popup does not exist, yet!</p><table><tr><td class="submit">';
    }
    $popup_contents .= '<input type="submit" value="cancel" onclick="xajax_closePopup(); return false;" /></td></tr>
		</table>
		</form>';
    $popup_contents = '<div>' . $popup_title . '<button onclick="xajax_closePopup(); return false;" class="red">Close</button></div>' . $popup_contents;
    $objResponse->insert("page", "div", "popup");
    $objResponse->assign("popup", 'innerHTML', $popup_contents);
    return $objResponse;
}
开发者ID:apexad,项目名称:editsee,代码行数:101,代码来源:xajax.php


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