本文整理汇总了PHP中isid函数的典型用法代码示例。如果您正苦于以下问题:PHP isid函数的具体用法?PHP isid怎么用?PHP isid使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isid函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isid
$esxi = $ui->post['esxi'];
$ip = $ui->post['ip'];
$thin = $ui->post['thin'];
$thinquota = isid($ui->post['thinquota'], "2");
$port = $ui->post['port'];
$reseller = $ui->post['reseller'];
$user = $ui->post['user'];
$pass = $ui->startparameter('pass', 'post');
$os = "linux";
$description = $ui->description('description', 'post');
$cores = isid($ui->post['cores'], "5");
$cpu = $ui->description('cpu', 'post');
$mhz = isid($ui->post['mhz'], "5");
$ram = isid($ui->post['ram'], "5");
$hdd = $ui->startparameter('hdd', 'post');
$maxserver = isid($ui->post['maxserver'], "3");
$pinsert = $sql->prepare("UPDATE `virtualhosts` SET `active`=:active,`esxi`=:esxi,`ip`=:ip,`port`=AES_ENCRYPT(:port,:aeskey),`user`=AES_ENCRYPT(:user,:aeskey),`pass`=AES_ENCRYPT(:pass,:aeskey),`os`=:os,`description`=:description,`publickey`=:publickey,`keyname`=:keyname,`cpu`=:cpu,`cores`=:cores,`mhz`=:mhz,`hdd`=:hdd,`ram`=:ram,`maxserver`=:maxserver,`thin`=:thin,`thinquota`=:thinquota,`resellerid`=:reseller WHERE `id`=:id LIMIT 1");
$pinsert->execute(array(':active' => $active, ':esxi' => $esxi, ':ip' => $ip, ':port' => $port, ':aeskey' => $aeskey, ':user' => $user, ':pass' => $pass, ':os' => $os, ':description' => $description, ':publickey' => $publickey, ':keyname' => $keyname, ':cpu' => $cpu, ':cores' => $cores, ':mhz' => $mhz, ':hdd' => $hdd, ':ram' => $ram, ':maxserver' => $maxserver, ':id' => $id, ':thin' => $thin, ':thinquota' => $thinquota, ':reseller' => $reseller));
$template_file = $spracheResponse->table_add;
$loguseraction = "%mod% %virtual% {$ip}";
$insertlog->execute();
}
} else {
$template_file = 'admin_404.tpl';
}
}
} else {
$table = array();
$o = $ui->st('o', 'get');
if ($ui->st('o', 'get') == 'ap') {
$orderby = 'h.`ip` ASC';
示例2: while
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$foundGroupIDs[] = $row['groupID'];
}
$query = $sql->prepare("SELECT `id` FROM `usergroups` WHERE `active`='Y' AND `id`=? AND `resellerid`=? LIMIT 1");
if (isset($data['groupID']) and isid($data['groupID'], 19)) {
$query->execute(array($data['groupID'], $resellerID));
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$userGroupIDs[] = $row['id'];
}
} else {
if (isset($data['groupID'])) {
if (!is_array($data['groupID']) and !is_object($data['groupID'])) {
$data['groupID'] = array($data['groupID']);
}
foreach ($data['groupID'] as $groupID) {
if (isid($groupID, 19)) {
$query->execute(array($groupID, $resellerID));
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$userGroupIDs[] = $row['id'];
}
}
}
}
}
if (count($userGroupIDs) > 0) {
$query = $sql->prepare("DELETE FROM `userdata_groups` WHERE `userID`=? AND `groupID`=? AND `resellerID`=? LIMIT 1");
foreach ($foundGroupIDs as $groupID) {
if (!in_array($groupID, $userGroupIDs)) {
$query->execute(array($localID, $groupID, $resellerID));
}
}
示例3: while
$query2 = $sql->prepare("SELECT `ip`,`bitversion` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
$query2->execute(array($row['rootid'], $resellerToUse));
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
$queryip = $row2['ip'];
$bitversion = $row2['bitversion'];
}
}
}
}
if (!isset($masteractive) or !isset($usedns) or $masteractive == 'N') {
$template_file = 'userpanel_404.tpl';
} else {
$dns = strtolower($ui->domain('dns', 'post'));
$dnsCheck = checkDNS($dns, $id, $user_id, $type = 'server');
if ($usedns == 'Y' and $dns != $olddns and $dns != '' and $dnsCheck !== false) {
if (isset($tsdnsServerID) and isid($tsdnsServerID, 10) and isset($resellerToUse)) {
$query = $sql->prepare("SELECT *,AES_DECRYPT(`ssh2port`,:aeskey) AS `decryptedssh2port`,AES_DECRYPT(`ssh2user`,:aeskey) AS `decryptedssh2user`,AES_DECRYPT(`ssh2password`,:aeskey) AS `decryptedssh2password` FROM `voice_tsdns` WHERE `active`='Y' AND `id`=:id AND `resellerid`=:reseller_id LIMIT 1");
$query->execute(array(':aeskey' => $aeskey, ':id' => $tsdnsServerID, ':reseller_id' => $resellerToUse));
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$publickey = $row['publickey'];
$queryip = $row['ssh2ip'];
$ssh2port = $row['decryptedssh2port'];
$ssh2user = $row['decryptedssh2user'];
$ssh2password = $row['decryptedssh2password'];
$serverdir = $row['serverdir'];
$keyname = $row['keyname'];
$bit = $row['bitversion'];
$bitversion = $row['bitversion'];
}
}
$return = tsdns('md', $queryip, $ssh2port, $ssh2user, $publickey, $keyname, $ssh2password, $mnotified, $serverdir, $bitversion, array($ip, $oldip), array($port, $oldport), array($dns, $olddns), $reseller_id);
示例4: customColumns
function customColumns($item, $id = 0, $action = false, $api = false)
{
global $sql, $user_language, $default_language;
$return = array();
if ($id !== null) {
$query = $sql->prepare("SELECT * FROM `custom_columns_settings` WHERE `item`=? AND `active`='Y'");
$query->execute(array($item));
if ($action == false) {
$query2 = $sql->prepare("SELECT `text` FROM `translations` WHERE `type`='cc' AND `transID`=? AND `lang`=? LIMIT 1");
$query3 = $sql->prepare("SELECT `var` FROM `custom_columns` WHERE `customID`=? AND `itemID`=? LIMIT 1");
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$text = '';
$query2->execute(array($row['customID'], $user_language));
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
$text = $row2['text'];
}
if (empty($text)) {
$query2->execute(array($row['customID'], $default_language));
while ($row2 = $query2->fetch(PDO::FETCH_ASSOC)) {
$text = $row2['text'];
}
}
$type = $row['type'] == 'I' ? 'number' : 'text';
$query3->execute(array($row['customID'], $id));
$value = $id == 0 ? '' : $query3->fetchColumn();
$return[] = array('customID' => $row['customID'], 'menu' => $text, 'name' => $row['name'], 'length' => $row['length'], 'type' => $row['type'], 'input' => "<input id='inputCustom-{$row['customID']}' type='{$type}' name='{$row['name']}' maxlength='{$row['length']}' value='{$value}' >", 'value' => $value);
}
} else {
if ($action == 'save') {
$return = 0;
$query2 = $sql->prepare("INSERT INTO `custom_columns` (`customID`,`itemID`,`var`) VALUES (?,?,?) ON DUPLICATE KEY UPDATE `var`=VALUES(`var`)");
if ($api == false) {
global $ui;
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$var = '';
if ($row['type'] == 'I' and $ui->id($row['name'], $row['length'], 'post')) {
$var = $ui->id($row['name'], $row['length'], 'post');
} else {
if ($ui->names($row['name'], $row['length'], 'post')) {
$var = $ui->names($row['name'], $row['length'], 'post');
}
}
$query2->execute(array($row['customID'], $id, $var));
$return += $query2->rowCount();
}
} else {
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$var = '';
if (isset($api[$row['name']])) {
if ($row['type'] == 'I') {
$var = isid($api[$row['name']], $row['length']);
} else {
if (names($api[$row['name']], $row['length'])) {
$var = names($api[$row['name']], $row['length']);
}
}
$query2->execute(array($row['customID'], $id, $var));
$return += $query2->rowCount();
}
}
}
} else {
if ($action == 'del') {
$return = 0;
$query2 = $sql->prepare("DELETE FROM `custom_columns` WHERE `customID`=? AND `itemID`=? LIMIT 1");
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$query2->execute(array($row['customID'], $id));
$return += $query2->rowCount();
}
}
}
}
}
return $return;
}
示例5: checkDNS
function checkDNS($dns, $id = null, $user_id = null, $type = '')
{
global $sql, $reseller_id;
if ($type == 'server') {
$query = $sql->prepare("SELECT `masterserver` FROM `voice_server` WHERE `id`=? AND `resellerid`=? LIMIT 1");
$query->execute(array($id, $reseller_id));
$masterID = $query->fetchColumn();
$query = $sql->prepare("SELECT `tsdnsID` FROM `voice_dns` WHERE `dns`=? AND `resellerID`=? LIMIT 1");
$query->execute(array($dns, $reseller_id));
$query2 = $sql->prepare("SELECT `masterserver` FROM `voice_server` WHERE `id`!=? AND `dns`=? AND `resellerid`=? LIMIT 1");
$query2->execute(array($id, $dns, $reseller_id));
} else {
if ($type == 'dns') {
$query = $sql->prepare("SELECT `tsdnsID` FROM `voice_dns` WHERE `dnsID`!=? AND `resellerID`=? LIMIT 1");
$query->execute(array($id, $reseller_id));
$masterID = $query->fetchColumn();
$query = $sql->prepare("SELECT `tsdnsID` FROM `voice_dns` WHERE `dnsID`!=? AND `dns`=? AND `resellerID`=? LIMIT 1");
$query->execute(array($id, $dns, $reseller_id));
$query2 = $sql->prepare("SELECT `id` FROM `voice_server` WHERE `dns`=? AND `resellerid`=? LIMIT 1");
$query2->execute(array($dns, $reseller_id));
} else {
$query = $sql->prepare("SELECT `tsdnsID` FROM `voice_dns` WHERE `dns`=? AND `resellerID`=? LIMIT 1");
$query->execute(array($dns, $reseller_id));
$query2 = $sql->prepare("SELECT `id` FROM `voice_server` WHERE `dns`=? AND `resellerid`=? LIMIT 1");
$query2->execute(array($dns, $reseller_id));
}
}
if ($query->rowCount() > 0 or $query2->rowCount() > 0) {
return false;
}
if ($user_id != null) {
$serverdnsArray = array();
$query = $sql->prepare("SELECT `id`,`defaultdns`,`externalDefaultDNS`,`tsdnsServerID` FROM `voice_masterserver` WHERE `resellerid`=?");
$query->execute(array($reseller_id));
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
if ($row['externalDefaultDNS'] == 'N') {
unset($temp);
if ($type == 'server' and $id != null and $row['id'] == $masterID) {
$defaultdns = strtolower($id . '.' . $row['defaultdns']);
$partCount = count(explode('.', $defaultdns));
}
$ex = explode('.', $row['defaultdns']);
$i = count($ex) - 1;
while ($i >= 0) {
$serverdnsArray[] = isset($temp) ? $ex[$i] . '.' . $temp : $ex[$i];
$i--;
}
} else {
if ($type == 'server' and $row['externalDefaultDNS'] == 'Y' and $id != null and $row['id'] == $masterID) {
$tsdnsServerID = $row['tsdnsServerID'];
}
}
}
$query = $sql->prepare("SELECT `id`,`defaultdns` FROM `voice_tsdns` WHERE `resellerid`=?");
$query->execute(array($reseller_id));
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
unset($temp);
if (isset($tsdnsServerID) and $id != null and $row['id'] == $tsdnsServerID or $type == 'dns' and $id != null and $row['id'] == $masterID) {
$defaultdns = strtolower($id . '-' . getusername($user_id) . '.' . $row['defaultdns']);
$partCount = count(explode('.', $defaultdns));
}
$ex = explode('.', $row['defaultdns']);
$i = count($ex) - 1;
while ($i >= 0) {
$serverdnsArray[] = isset($temp) ? $ex[$i] . '.' . $temp : $ex[$i];
$i--;
}
}
if (isset($defaultdns) and $dns == $defaultdns) {
return true;
}
$ex = explode('.', $dns);
$dnsPartCount = count($ex);
$first = $ex[0];
if (isset($partCount) and $partCount == $dnsPartCount and isid($first, 10) and ($type == 'dns' or $type == 'server' and $first != $id)) {
return false;
}
$ex = explode('-', $first);
if ($type == 'dns' and isset($partCount) and $partCount == $dnsPartCount and $ex[0] != $id) {
return false;
}
$serverdnsArray = array_unique($serverdnsArray);
if ((isset($defaultdns) and $dns != $defaultdns or !isset($defaultdns)) and in_array($dns, $serverdnsArray)) {
return false;
}
}
return true;
}
示例6: tsdns
if (isset($removelist)) {
$connection->AdminPermissions($localserverid, 'del', $removelist);
}
if ($usedns == 'Y') {
$template_file = tsdns('md', $queryip, $ssh2port, $ssh2user, $publickey, $keyname, $ssh2password, $mnotified, $serverdir, $bitversion, array($ip, $oldip), array($port, $oldport), array($dns, $olddns), $row2['resellerID']);
}
if ($row3['active'] == 'N' or $extraData->newActive == 'N') {
$connection->StopServer($localserverid);
}
$query3 = $sql->prepare("UPDATE `jobs` SET `status`='3' WHERE `jobID`=? AND `type`='vo' LIMIT 1");
$query3->execute(array($row2['jobID']));
$query3 = $sql->prepare("UPDATE `voice_server` SET `jobPending`='N' WHERE `id`=? LIMIT 1");
$query3->execute(array($row2['affectedID']));
}
} else {
if (!isset($localserverid) or !isid($localserverid, 30)) {
$command = 'Error: can not find voiceserver';
$query3 = $sql->prepare("UPDATE `jobs` SET `status`='2' WHERE `jobID`=? AND `type`='vo' LIMIT 1");
$query3->execute(array($row2['jobID']));
} else {
$command = 'Error: unknown command';
}
}
}
}
$theOutput->printGraph($command);
}
$connection->CloseConnection();
}
} else {
$query2 = $sql->prepare("SELECT * FROM `jobs` WHERE (`status` IS NULL OR `status`='1') AND `type`='vo' AND `hostID`=?");
示例7: count
$addedby = $row2['addedby'];
$queryport = $row2['queryport'];
$querypassword = $row2['decryptedquerypassword'];
$resellerid = $row2['resellerid'];
$autorestart = $row2['autorestart'];
if ($addedby == 2) {
$queryip = $row2['ssh2ip'];
} else {
if ($addedby == 1) {
$query3 = $sql->prepare("SELECT `ip` FROM `rserverdata` WHERE `id`=? AND `resellerid`=? LIMIT 1");
$query3->execute(array($row2['rootid'], $resellerid));
$queryip = $query3->fetchColumn();
}
}
$tsdnsExternalActive = false;
if (isid($row2['tsdnsServerID'], 19)) {
$query3 = $sql->prepare("SELECT `id` FROM `voice_tsdns` WHERE `active`='Y' AND `id`=? LIMIT 1");
$query3->execute(array($row2['tsdnsServerID']));
if ($query3->rowCount() > 0) {
$tsdnsExternalActive = true;
}
}
$split_config = preg_split('/\\//', $row2['serverdir'], -1, PREG_SPLIT_NO_EMPTY);
$folderfilecount = count($split_config) - 1;
$i = 0;
$folders = substr($row2['serverdir'], 0, 1) == '/' ? 'cd /' : 'cd ';
while ($i <= $folderfilecount) {
$folders = $folders . $split_config[$i] . '/';
$i++;
}
$folders = $folders == 'cd ' ? '' : $folders . ' && ';
示例8: flush
flush();
# MySQL table sizes
if ($checkTypeOfServer == 'all' or $checkTypeOfServer == 'my') {
$query = $sql->prepare("SELECT `id`,`ip`,`port`,`user`,AES_DECRYPT(`password`,?) AS `decryptedpassword` FROM `mysql_external_servers` WHERE `active`='Y'");
$query2 = $sql->prepare("SELECT `id` FROM `mysql_external_dbs` WHERE `sid`=? AND `dbname`=? LIMIT 1");
$query3 = $sql->prepare("UPDATE `mysql_external_dbs` SET `dbSize`=? WHERE `id`=? LIMIT 1");
$query->execute(array($aeskey));
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
$remotesql = new ExternalSQL($row['ip'], $row['port'], $row['user'], $row['decryptedpassword']);
if ($remotesql->error == 'ok') {
$list = $remotesql->getDBSizeList();
if (is_array($list)) {
foreach ($list as $db) {
$query2->execute(array($row['id'], $db['dbName']));
$dbID = $query2->fetchColumn();
if (isid($dbID, 10)) {
echo 'Found DB ' . $db['dbName'] . ' with size ' . $db['dbSize'] . "\r\n";
$query3->execute(array(round($db['dbSize']), $dbID));
} else {
echo 'Cannot find DB ' . $db['dbName'] . ' with size ' . $db['dbSize'] . "\r\n";
}
}
} else {
echo 'Error getting DB list for DB Server ' . $row['ip'] . ':' . $row['port'] . ': ' . $list . "\r\n";
}
} else {
echo 'Error connecting to DB Server ' . $row['ip'] . ':' . $row['port'] . ': ' . $remotesql->error . "\r\n";
}
}
}
flush();
示例9: header
* Easy-WI wird in der Hoffnung, dass es nuetzlich sein wird, aber
* OHNE JEDE GEWAEHELEISTUNG, bereitgestellt; sogar ohne die implizite
* Gewaehrleistung der MARKTFAEHIGKEIT oder EIGNUNG FUER EINEN BESTIMMTEN ZWECK.
* Siehe die GNU General Public License fuer weitere Details.
*
* Sie sollten eine Kopie der GNU General Public License zusammen mit diesem
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
*/
if (!isset($page_include)) {
header('Location: index.php');
die;
}
if (isset($page_name) and isid($page_name, 10)) {
$downloadID = (int) $page_name;
} else {
if (isset($page_count) and isid($page_count, 10)) {
$downloadID = (int) $page_count;
} else {
if ($ui->id('id', 10, 'get')) {
$downloadID = $ui->id('id', 10, 'get');
}
}
}
if (isset($page_name) and $page_name == 'get' or $ui->smallletters('action', 3, 'get') == 'get') {
$startDownload = true;
}
if (isset($downloadID)) {
$query = $sql->prepare("SELECT d.*,t.`text` FROM `page_downloads` d LEFT JOIN `translations` t ON t.`type`='pd' AND t.`transID`=d.`fileID` AND t.`lang`=? WHERE d.`fileID`=? LIMIT 1");
$query->execute(array($user_language, $downloadID));
while ($row = $query->fetch(PDO::FETCH_ASSOC)) {
if (($row['show'] == 'E' or $row['show'] == 'A' and isset($admin_id) or $row['show'] == 'R' and (isset($user_id) or isset($admin_id))) and file_exists(EASYWIDIR . "/downloads/{$row['fileID']}.{$row['fileExtension']}")) {
示例10:
if (!isid($ui->post['cores'], 1)) {
$fail = 1;
} else {
$cores = $ui->post['cores'];
}
if (!isid($ui->post['minmhz'], "5") and $ui->post['minmhz'] != 0) {
$fail = 1;
$template_file .= "MinMHZ";
} else {
$minmhz = $ui->post['minmhz'];
}
if (!isid($ui->post['maxmhz'], "5")) {
$fail = 1;
$template_file .= "MAXMHZ";
}
if (!isid($ui->post['hddsize'], 4)) {
$fail = 1;
$template_file .= "HDDsize";
}
if (!isinteger($ui->post['ram'])) {
$fail = 1;
$template_file .= "Ram";
}
if (!isinteger($ui->post['minram'])) {
$fail = 1;
$template_file .= "MinRam";
} else {
$minram = $ui->post['minram'];
}
if (!isinteger($ui->post['maxram'])) {
$fail = 1;
示例11: die
* Gewaehrleistung der MARKTFAEHIGKEIT oder EIGNUNG FUER EINEN BESTIMMTEN ZWECK.
* Siehe die GNU General Public License fuer weitere Details.
*
* Sie sollten eine Kopie der GNU General Public License zusammen mit diesem
* Programm erhalten haben. Wenn nicht, siehe <http://www.gnu.org/licenses/>.
*/
if (!defined('AJAXINCLUDED')) {
die('Do not access directly!');
}
$query = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `webVhost` WHERE `resellerID`=?");
$query->execute(array($resellerLockupID));
$array['iTotalRecords'] = $query->fetchColumn();
if ($sSearch) {
$userInQuery = count($userIDs) > 0 ? ' OR `userID` IN (' . implode(',', $userIDs) . ')' : '';
$toLower = strtolower($sSearch);
if (strpos('web-', $toLower) !== false or isid(str_replace('web-', '', $toLower), 10)) {
$sSearch = preg_replace('/[a-zA-Z\\-]/', '', $sSearch);
}
$statusQuery = array();
if (strpos(strtolower($gsprache->status_inactive), $toLower) !== false or strpos(strtolower($gsprache->status_stop), $toLower) !== false) {
$statusQuery[] = "OR v.`active`='N'";
}
if (strpos(strtolower($gsprache->status_ok), $toLower) !== false) {
$statusQuery[] = "OR v.`active`='Y'";
}
$statusQuery = count($statusQuery) > 0 ? implode(' ', $statusQuery) : '';
$query = $sql->prepare("SELECT COUNT(1) AS `amount` FROM `webVhost` AS v LEFT JOIN `userdata` AS u ON v.`userID`=u.`id` WHERE v.`resellerID`=:reseller_id AND (v.`webVhostID` LIKE :search OR v.`description` LIKE :search {$userInQuery} {$statusQuery})");
$query->execute(array(':search' => '%' . $sSearch . '%', ':reseller_id' => $resellerLockupID));
$array['iTotalDisplayRecords'] = $query->fetchColumn();
} else {
$array['iTotalDisplayRecords'] = $array['iTotalRecords'];
示例12: foreach
if ($substituteImported === true and isid($belongsToLocalID, 11)) {
$serverAccess = (array) $value->serverAccess;
foreach ($serverAccess['gs'] as $externalGsID) {
$query6->execute(array(json_encode(array('I' => $row['importID'])), $externalGsID, $belongsToLocalID, $resellerID));
$localGsID = $query6->fetchColumn();
if (isid($localGsID, 10)) {
$query7->execute(array($localID, $localGsID, $resellerID));
printText('Imported substitute gameserver server access. Local gameserverid is: ' . $localGsID);
} else {
printText('Error: Importing substitute gameserver server access. No local gameserver');
}
}
foreach ($serverAccess['vo'] as $externalVoID) {
$query8->execute(array(json_encode(array('I' => $row['importID'])), $externalVoID, $belongsToLocalID, $resellerID));
$localVoID = $query8->fetchColumn();
if (isid($localVoID, 10)) {
$query9->execute(array($localID, $localVoID, $resellerID));
printText('Imported substitute gameserver server access. Local gameserverid is: ' . $localVoID);
} else {
printText('Error: Importing substitute gameserver server access. No local voiceserver');
}
}
}
}
}
if ($left > 0) {
printText('Total amount is: ' . $decoded->total . ' substitutes left: ' . $left . ' need to make another run');
sleep(1);
} else {
printText('Total amount is: ' . $decoded->total . ' No substitute left.');
}
示例13: array
}
$ips = array();
$ports = array();
$addresses = array();
$words = array();
$ids = array();
$adIDs = array();
$gsIDs = array();
$imIDs = array();
$roIDs = array();
$usIDs = array();
$voIDs = array();
$vsIDs = array();
foreach (preg_split("/\\s/", $ui->get['q'], -1, PREG_SPLIT_NO_EMPTY) as $s) {
switch ($s) {
case isid($s, 19):
$ids[] = $s;
$q[] = $s;
if (port($s)) {
$ports[] = $s;
}
break;
case isip($s, 'all'):
$ips[] = $s;
$q[] = $s;
break;
case ipport($s):
$addresses[] = $s;
list($ips[], $ports[]) = explode(':', preg_replace('/\\s+/', '', $s));
$q[] = $s;
break;
示例14: channelList
public function channelList($virtualserver_id)
{
$this->StartServer($virtualserver_id);
$useserver = $this->UseServer($virtualserver_id);
if (isset($useserver[0]['msg']) and strtolower($useserver[0]['msg']) == 'ok') {
$channels = array();
$channelList = $this->SendCommand('channellist');
if (is_array($channelList)) {
foreach ($channelList as $channel) {
if (isset($channel['cid']) and isid($channel['cid'], 30)) {
$props = $this->SendCommand('channelinfo cid=' . $channel['cid']);
if (isset($props[0]['channel_name'])) {
$channels[$this->ReplaceFromTS3($props[0]['channel_name'])] = $this->ReplaceFromTS3($props[0]['channel_filepath']);
}
}
}
}
$return = json_encode($channels);
} else {
$return = $useserver;
}
return $return;
}
示例15: isid
$errors['publickey'] = $sprache->keyuse;
if ($publickey == 'N') {
$errors['pass'] = $sprache->ssh_pass;
} else {
if (!$ui->active('publickey', 'post') == 'B') {
$errors['pass'] = $sprache->ssh_pass;
$errors['keyname'] = $sprache->keyname;
} else {
$errors['keyname'] = $sprache->keyname;
}
}
}
}
if (count($errors) == 0) {
if ($ui->st('action', 'post') == 'ad' and $reseller_id == 0) {
$insertOwner = isid($ownerID, 10) ? $ownerID : 0;
$query = $sql->prepare("INSERT INTO `rserverdata` (`config_log_time`,`config_demo_time`,`config_ztmp_time`,`config_bad_time`,`config_user_id`,`config_ionice`,`config_binaries`,`config_files`,`config_bad_files`,`active`,`steamAccount`,`steamPassword`,`hyperthreading`,`cores`,`ip`,`altips`,`port`,`user`,`pass`,`os`,`bitversion`,`description`,`ftpport`,`publickey`,`keyname`,`maxslots`,`maxserver`,`updates`,`updateMinute`,`ram`,`connect_ip_only`,`install_paths`,`quota_active`,`quota_cmd`,`repquota_cmd`,`blocksize`,`inode_block_ratio`,`externalID`,`resellerid`) VALUES (:configLogTime,:configDemoTime,:configZtmpTime,:configBadTime,:configUserID,:configIonice,:configBinaries,:configFiles,:configBadFiles,:active,AES_ENCRYPT(:steamAccount,:aeskey),AES_ENCRYPT(:steamPassword,:aeskey),:hyperthreading,:cores,:ip,:altips,AES_ENCRYPT(:port,:aeskey),AES_ENCRYPT(:user,:aeskey),AES_ENCRYPT(:pass,:aeskey),:os,:bit,:desc,:ftpport,:publickey,:keyname,:maxslots,:maxserver,:updates,:updateMinute,:ram,:connect_ip_only,:install_paths,:quota_active,:quota_cmd,:repquota_cmd,:blocksize,:inode_block_ratio,:externalID,:reseller)");
$query->execute(array(':configLogTime' => $configLogTime, ':configDemoTime' => $configDemoTime, ':configZtmpTime' => $configZtmpTime, ':configBadTime' => $configBadTime, ':configUserID' => $configUserID, ':configIonice' => $configIonice, ':configBinaries' => $configBinaries, ':configFiles' => $configFiles, ':configBadFiles' => $configBadFiles, ':active' => $active, ':steamAccount' => $steamAccount, ':steamPassword' => $steamPassword, ':hyperthreading' => $hyperthreading, ':cores' => $cores, ':ip' => $ip, ':altips' => $altips, ':port' => $port, ':aeskey' => $aeskey, ':user' => $user, ':pass' => $pass, ':os' => $os, ':bit' => $bit, ':desc' => $desc, ':ftpport' => $ftpport, ':publickey' => $publickey, ':keyname' => $keyname, ':maxslots' => $maxslots, ':maxserver' => $maxserver, ':updates' => $updates, ':updateMinute' => $updateMinute, ':ram' => $ram, ':connect_ip_only' => $connectIpOnly, ':install_paths' => $installPaths, ':quota_active' => $quotaActive, ':quota_cmd' => $quotaCmd, ':repquota_cmd' => $repquotaCmd, ':blocksize' => $blocksize, ':inode_block_ratio' => $inodeBlockRatio, ':externalID' => $externalID, ':reseller' => $ownerID));
$rowCount = $query->rowCount();
$loguseraction = '%add% %root% ' . $ip;
} else {
if ($ui->st('action', 'post') == 'md') {
if ($reseller_id == 0) {
$query = $sql->prepare("UPDATE `rserverdata` SET `config_log_time`=:configLogTime,`config_demo_time`=:configDemoTime,`config_ztmp_time`=:configZtmpTime,`config_bad_time`=:configBadTime,`config_user_id`=:configUserID,`config_ionice`=:configIonice,`config_binaries`=:configBinaries,`config_files`=:configFiles,`config_bad_files`=:configBadFiles,`active`=:active,`steamAccount`=AES_ENCRYPT(:steamAccount,:aeskey),`steamPassword`=AES_ENCRYPT(:steamPassword,:aeskey),`hyperthreading`=:hyperthreading,`cores`=:cores,`ip`=:ip,`altips`=:altips,`port`=AES_ENCRYPT(:port,:aeskey),`user`=AES_ENCRYPT(:user, :aeskey),`pass`=AES_ENCRYPT(:pass, :aeskey),`os`=:os,`bitversion`=:bit,`description`=:desc,`ftpport`=:ftpport,`publickey`=:publickey,`keyname`=:keyname,`maxslots`=:maxslots,`maxserver`=:maxserver,`updates`=:updates,`updateMinute`=:updateMinute,`ram`=:ram,`connect_ip_only`=:connect_ip_only,`install_paths`=:install_paths,`quota_active`=:quota_active,`quota_cmd`=:quota_cmd,`repquota_cmd`=:repquota_cmd,`blocksize`=:blocksize,`inode_block_ratio`=:inode_block_ratio,`externalID`=:externalID,`resellerid`=:reseller_id WHERE `id`=:id LIMIT 1");
$query->execute(array(':configLogTime' => $configLogTime, ':configDemoTime' => $configDemoTime, ':configZtmpTime' => $configZtmpTime, ':configBadTime' => $configBadTime, ':configUserID' => $configUserID, ':configIonice' => $configIonice, ':configBinaries' => $configBinaries, ':configFiles' => $configFiles, ':configBadFiles' => $configBadFiles, ':active' => $active, ':steamAccount' => $steamAccount, ':steamPassword' => $steamPassword, ':hyperthreading' => $hyperthreading, ':cores' => $cores, ':ip' => $ip, ':altips' => $altips, ':port' => $port, ':aeskey' => $aeskey, ':user' => $user, ':pass' => $pass, ':os' => $os, ':bit' => $bit, ':desc' => $desc, ':publickey' => $publickey, ':ftpport' => $ftpport, ':keyname' => $keyname, ':maxslots' => $maxslots, ':maxserver' => $maxserver, ':updates' => $updates, ':updateMinute' => $updateMinute, ':ram' => $ram, ':connect_ip_only' => $connectIpOnly, ':install_paths' => $installPaths, ':quota_active' => $quotaActive, ':quota_cmd' => $quotaCmd, ':repquota_cmd' => $repquotaCmd, ':blocksize' => $blocksize, ':inode_block_ratio' => $inodeBlockRatio, ':externalID' => $externalID, ':reseller_id' => $ownerID, ':id' => $id));
} else {
$query = $sql->prepare("UPDATE `rserverdata` AS r SET `config_log_time`=:configLogTime,`config_demo_time`=:configDemoTime,`config_ztmp_time`=:configZtmpTime,`config_bad_time`=:configBadTime,`config_user_id`=:configUserID,`config_ionice`=:configIonice,`config_binaries`=:configBinaries,`config_files`=:configFiles,`config_bad_files`=:configBadFiles,`active`=:active,`steamAccount`=AES_ENCRYPT(:steamAccount,:aeskey),`steamPassword`=AES_ENCRYPT(:steamPassword,:aeskey),`hyperthreading`=:hyperthreading,`cores`=:cores,`ip`=:ip,`altips`=:altips,`port`=AES_ENCRYPT(:port,:aeskey),`user`=AES_ENCRYPT(:user, :aeskey),`pass`=AES_ENCRYPT(:pass, :aeskey),`os`=:os,`bitversion`=:bit,`description`=:desc,`ftpport`=:ftpport,`publickey`=:publickey,`keyname`=:keyname,`maxslots`=:maxslots,`maxserver`=:maxserver,`updates`=:updates,`updateMinute`=:updateMinute,`ram`=:ram,`connect_ip_only`=:connect_ip_only,`install_paths`=:install_paths,`quota_active`=:quota_active,`quota_cmd`=:quota_cmd,`repquota_cmd`=:repquota_cmd,`blocksize`=:blocksize,`inode_block_ratio`=:inode_block_ratio,`externalID`=:externalID,`resellerid`=:ownerID WHERE `id`=:id AND (`resellerid`=:reseller_id OR EXISTS (SELECT 1 FROM `userdata` WHERE `resellerid`=:reseller_id AND `id`=r.`resellerid`)) LIMIT 1");
$query->execute(array(':configLogTime' => $configLogTime, ':configDemoTime' => $configDemoTime, ':configZtmpTime' => $configZtmpTime, ':configBadTime' => $configBadTime, ':configUserID' => $configUserID, ':configIonice' => $configIonice, ':configBinaries' => $configBinaries, ':configFiles' => $configFiles, ':configBadFiles' => $configBadFiles, ':active' => $active, ':steamAccount' => $steamAccount, ':steamPassword' => $steamPassword, ':hyperthreading' => $hyperthreading, ':cores' => $cores, ':ip' => $ip, ':altips' => $altips, ':port' => $port, ':aeskey' => $aeskey, ':user' => $user, ':pass' => $pass, ':os' => $os, ':bit' => $bit, ':desc' => $desc, ':publickey' => $publickey, ':ftpport' => $ftpport, ':keyname' => $keyname, ':maxslots' => $maxslots, ':maxserver' => $maxserver, ':updates' => $updates, ':updateMinute' => $updateMinute, ':ram' => $ram, ':connect_ip_only' => $connectIpOnly, ':install_paths' => $installPaths, ':quota_active' => $quotaActive, ':quota_cmd' => $quotaCmd, ':repquota_cmd' => $repquotaCmd, ':blocksize' => $blocksize, ':inode_block_ratio' => $inodeBlockRatio, ':externalID' => $externalID, ':ownerID' => $ownerID, ':id' => $id, ':reseller_id' => $resellerLockupID));
}
$rowCount = $query->rowCount();
$loguseraction = '%mod% %root% ' . $ip;