本文整理汇总了PHP中Social::selectByMulti方法的典型用法代码示例。如果您正苦于以下问题:PHP Social::selectByMulti方法的具体用法?PHP Social::selectByMulti怎么用?PHP Social::selectByMulti使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Social
的用法示例。
在下文中一共展示了Social::selectByMulti方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ConsoleOption
<?php
$prevFolder = "../../../";
include_once $prevFolder . "_setup.php";
// Start Page
$consoleObj = new ConsoleOption($mysqli);
$cID = $consoleObj->findConsoleIDByName("Add Social Media Icon");
$consoleObj->select($cID);
$consoleInfo = $consoleObj->get_info_filtered();
$member = new Member($mysqli);
$member->select($_SESSION['btUsername']);
// Check Login
$LOGIN_FAIL = true;
if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) {
$socialObj = new Social($mysqli);
if (!$_POST['confirm'] && $socialObj->selectByMulti(array("name" => "Twitch"))) {
echo "\n\t\t\t\t<div id='addTwitchInfo'></div>\n\t\t\t\t<div id='confirmAddTwitch' style='display: none'>\n\t\t\t\t\t<p align='center' class='main'>\n\t\t\t\t\t\tThere is already a Social Media Icon named Twitch. Are you sure you want to add a new Twitch Social Media Icon?\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\$('#addTwitchLoading').hide();\n\n\t\t\t\t\t\t\$('#confirmAddTwitch').dialog({\n\t\t\t\t\t\t\ttitle: 'Confirm',\n\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\twidth: 400,\n\t\t\t\t\t\t\tzIndex: 99999,\n\t\t\t\t\t\t\tshow: 'scale',\n\t\t\t\t\t\t\tresizable: false,\n\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\t'Yes': function() {\n\t\n\t\t\t\t\t\t\t\t\t\$.post('" . MAIN_ROOT . "plugins/twitch/include/addtwitch.php', { confirm: '1' }, function(data) {\n\t\t\t\t\t\t\t\t\t\t\$('#addTwitchInfo').html(data);\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t'Cancel': function() {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\$(this).dialog('close');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t";
} else {
$saveName = "Twitch";
if ($socialObj->selectByMulti(array("name" => "Twitch"))) {
$result = $mysqli->query("SELECT social_id FROM " . $dbprefix . "social WHERE name LIKE '%Twitch%'");
$totalTwitch = $result->num_rows;
$saveName = "Twitch - " . ($totalTwitch + 1);
}
$arrColumns = array("name", "icon", "iconwidth", "iconheight", "url", "tooltip", "ordernum");
$arrValues = array($saveName, "plugins/twitch/images/twitch.png", "24", "24", "http://twitch.tv/", "Enter your Twitch username", $socialObj->getHighestOrderNum() + 1);
$socialObj->addNew($arrColumns, $arrValues);
$socialOptions = "";
$result = $mysqli->query("SELECT social_id,name FROM " . $dbprefix . "social ORDER BY ordernum DESC");
while ($row = $result->fetch_assoc()) {
$socialOptions .= "<option value='" . $row['social_id'] . "'>" . $row['name'] . "</option>";