本文整理汇总了PHP中formatURL函数的典型用法代码示例。如果您正苦于以下问题:PHP formatURL函数的具体用法?PHP formatURL怎么用?PHP formatURL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了formatURL函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: partnersAdmin
function partnersAdmin()
{
$xoopsDB =& Database::getInstance();
$myts =& MyTextSanitizer::getInstance();
xoops_cp_header();
echo "<h4>" . _MD_PARTNERADMIN . "</h4>\n <form action='index.php' method='post' name='reorderform'>\n <table width='100%' border='0' cellspacing='1' cellpadding='0' class='outer'><tr>\n <th width='10%' align='center'>" . _MD_TITLE . "</th>\n <th width='3%' align='center'>" . _MD_IMAGE . "</th>\n <th>" . _MD_DESCRIPTION . "</th>\n <th width='3%' align='center'>" . _MD_ACTIVE . "</th>\n <th width='3%' align='center'>" . _MD_WEIGHT . "</th>\n <th width='3%' align='center'>" . _MD_HITS . "</th>\n <th> </th></tr>";
$result = $xoopsDB->query("SELECT id, hits, url, weight, image, title, description, status FROM " . $xoopsDB->prefix("partners") . " ORDER BY status DESC, weight ASC, title DESC");
$class = 'even';
while (list($id, $hits, $url, $weight, $image, $title, $description, $status) = $xoopsDB->fetchrow($result)) {
$url = formatURL($myts->makeTboxData4Show($url));
$image = formatURL($myts->makeTboxData4Show($image));
$title = $myts->makeTboxData4Show($title);
$description = $myts->makeTboxData4Show($description);
$imageInfo = @getimagesize($image);
$imageWidth = $imageInfo[0];
$imageHeight = $imageInfo[1];
$check1 = "";
$check2 = "";
if ($status == 1) {
$check1 = "selected='selected'";
} else {
$check2 = "selected='selected'";
}
if ($imageWidth >= 110 or $imageHeight >= 50) {
$errorMsg = "<br />" . _MD_IMAGE_ERROR;
} else {
$errorMsg = "";
}
echo "<tr>\n <td class='{$class}' width='10%' align='center' valign='middle'><a href='" . $url . "' target='_blank'>" . $title . "</a></td>\n <td class='{$class}' width='3%' align='center'>";
if (!empty($image)) {
echo "<img src='" . $image . "' alt='" . $title . "' width='102' height='47' />" . $errorMsg;
}
echo "</td><td class='{$class}'>" . $description . "</td>\n <td class='{$class}' width='3%' align='center'>\n <select size='1' name='status[{$id}]'> <option value='1' " . $check1 . ">" . _MD_YES . "</option><option value='0' " . $check2 . ">" . _MD_NO . "</option></select>\n <td class='{$class}' width='3%' align='center'>";
echo "<input type='text' name='weight[{$id}]' value='{$weight}' size='3' maxlength='3' style='text-align: center;' />";
echo "</td><td class='{$class}' width='3%' align='center'>" . $hits . "</td>\n <td class='{$class}' width='3%' align='center'>\n <a href='index.php?op=editPartner&id=" . $id . "'>" . _MD_EDIT . "</a><br />--<br /><a href='index.php?op=delPartner&id=" . $id . "'>" . _MD_DELETE . "</a>\n </td></tr>";
$class = $class == 'odd' ? 'even' : 'odd';
}
echo "<tr><td class='foot' colspan='7' align='right'>\n <input type='hidden' name='op' value='reorderPartners' />\n <input type='button' name='button' onclick=\"location='index.php?op=partnersAdminAdd'\" value='" . _MD_PARTNERS_ADD . "' />\n <input type='button' name='button' onclick=\"location='index.php?op=reorderAutoPartners'\" value='" . _MD_AUTOMATIC_SORT . "' />\n <input type='submit' name='submit' value='" . _MD_REORDER . "' />\n </td></tr></table></form>";
xoops_cp_footer();
}
开发者ID:koki-h,项目名称:xoops_utf8,代码行数:40,代码来源:index.php
示例2: updateUser
/**
* Updates the member profile, saving the changes to the database
*
* @param $uid
* @param $uname
* @param $login_name
* @param $name
* @param $url
* @param $email
* @param $user_icq
* @param $user_aim
* @param $user_yim
* @param $user_msnm
* @param $user_from
* @param $user_occ
* @param $user_intrest
* @param $user_viewemail
* @param $user_avatar
* @param $user_sig
* @param $attachsig
* @param $theme
* @param $pass
* @param $pass2
* @param $rank
* @param $bio
* @param $uorder
* @param $umode
* @param $notify_method
* @param $notify_mode
* @param $timezone_offset
* @param $user_mailok
* @param $language
* @param $openid
* @param $user_viewoid
* @param $pass_expired
* @param $groups
*/
function updateUser($uid, $uname, $login_name, $name, $url, $email, $user_icq, $user_aim, $user_yim,
$user_msnm, $user_from, $user_occ, $user_intrest, $user_viewemail, $user_avatar,
$user_sig, $attachsig, $theme, $pass, $pass2, $rank, $bio, $uorder, $umode, $notify_method,
$notify_mode, $timezone_offset, $user_mailok, $language, $openid, $user_viewoid,
$pass_expired, $groups = array()
) {
global $icmsConfig, $icmsModule, $icmsConfigUser;
$member_handler = icms::handler('icms_member');
$edituser =& $member_handler->getUser($uid);
if ($edituser->getVar('uname') != $uname && $member_handler->getUserCount(new icms_db_criteria_Item('uname', $uname)) > 0 || $edituser->getVar('login_name') != $login_name && $member_handler->getUserCount(new icms_db_criteria_Item('login_name', $login_name)) > 0) {
icms_cp_header();
echo '<div class="CPbigTitle" style="background-image: url(' . ICMS_MODULES_URL . '/system/admin/users/images/users_big.png)">' . _MD_AM_USER . '</div><br />';
echo _AM_UNAME . ' ' . $uname . ' ' . _AM_ALREADY_EXISTS;
icms_cp_footer();
} else {
$edituser->setVar('name', $name);
$edituser->setVar('uname', $uname);
$edituser->setVar('login_name', $login_name);
$edituser->setVar('email', $email);
$edituser->setVar('openid', $openid);
$user_viewoid = (isset($user_viewoid) && $user_viewoid == 1) ? 1 : 0;
$edituser->setVar('user_viewoid', $user_viewoid);
$url = isset($url) ? formatURL($url) : '';
$edituser->setVar('url', $url);
$edituser->setVar('user_icq', $user_icq);
$edituser->setVar('user_from', $user_from);
if ($icmsConfigUser['allow_htsig'] == 0) {
$signature = strip_tags(icms_core_DataFilter::codeDecode($user_sig, 1));
$edituser->setVar('user_sig', icms_core_DataFilter::icms_substr($signature, 0, (int) $icmsConfigUser['sig_max_length']));
} else {
$signature = icms_core_DataFilter::checkVar($user_sig, 'html', 'input');
$edituser->setVar('user_sig', $signature);
}
$user_viewemail = (isset($user_viewemail) && $user_viewemail == 1) ? 1 : 0;
$edituser->setVar('user_viewemail', $user_viewemail);
$edituser->setVar('user_aim', $user_aim);
$edituser->setVar('user_yim', $user_yim);
$edituser->setVar('user_msnm', $user_msnm);
$attachsig = (isset($attachsig) && $attachsig == 1) ? 1 : 0;
$edituser->setVar('attachsig', $attachsig);
$edituser->setVar('timezone_offset', $timezone_offset);
$edituser->setVar('uorder', $uorder);
$edituser->setVar('umode', $umode);
$edituser->setVar('notify_method', $notify_method);
$edituser->setVar('notify_mode', $notify_mode);
$edituser->setVar('bio', $bio);
$edituser->setVar('rank', $rank);
$edituser->setVar('user_occ', $user_occ);
$edituser->setVar('user_intrest', $user_intrest);
$edituser->setVar('user_mailok', $user_mailok);
$edituser->setVar('language', $language);
if ($pass2 != '') {
if ($pass != $pass2) {
icms_cp_header();
echo "<strong>" . _AM_STNPDNM . "</strong>";
icms_cp_footer();
exit();
}
$icmspass = new icms_core_Password();
$edituser->setVar('pass_expired', $pass_expired);
$pass = $icmspass->encryptPass($pass);
$edituser->setVar('pass', $pass);
//.........这里部分代码省略.........
开发者ID:nao-pon,项目名称:impresscms,代码行数:101,代码来源:users.php
示例3: Criteria
break;
case XOOPS_MATCH_END:
$criteria->add(new Criteria('email', '%' . $myts->addSlashes(trim($_REQUEST['user_email'])), 'LIKE'));
break;
case XOOPS_MATCH_EQUAL:
$criteria->add(new Criteria('email', $myts->addSlashes(trim($_REQUEST['user_email']))));
break;
case XOOPS_MATCH_CONTAIN:
$criteria->add(new Criteria('email', '%' . $myts->addSlashes(trim($_REQUEST['user_email'])) . '%', 'LIKE'));
break;
}
$requete_pagenav .= '&email=' . htmlspecialchars($_REQUEST["user_email"]) . '&user_email_match=' . htmlspecialchars($_REQUEST['user_email_match']);
$requete_search .= 'email : ' . $_REQUEST['user_email'] . ' et user_email_match=' . $_REQUEST['user_email_match'] . '<br />';
}
if (!empty($_REQUEST['user_url'])) {
$url = formatURL(trim($_REQUEST['user_url']));
$criteria->add(new Criteria('url', $url . '%', 'LIKE'));
$requete_search .= 'url : ' . $_REQUEST['user_url'] . '<br />';
}
if (!empty($_REQUEST['user_icq'])) {
$match = !empty($_REQUEST['user_icq_match']) ? intval($_REQUEST['user_icq_match']) : XOOPS_MATCH_START;
switch ($match) {
case XOOPS_MATCH_START:
$criteria->add(new Criteria('user_icq', $myts->addSlashes(trim($_REQUEST['user_icq'])) . '%', 'LIKE'));
break;
case XOOPS_MATCH_END:
$criteria->add(new Criteria('user_icq', '%' . $myts->addSlashes(trim($_REQUEST['user_icq'])), 'LIKE'));
break;
case XOOPS_MATCH_EQUAL:
$criteria->add(new Criteria('user_icq', '%' . $myts->addSlashes(trim($_REQUEST['user_icq']))));
break;
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:31,代码来源:main.php
示例4: xoops_gethandler
$member_handler =& xoops_gethandler('member');
// make sure the username doesnt exist yet
if ($member_handler->getUserCount(new Criteria('uname', $uname)) > 0) {
$adduser_errormsg = 'User name ' . $uname . ' already exists';
} else {
$newuser =& $member_handler->createUser();
if (isset($user_viewemail)) {
$newuser->setVar("user_viewemail", $user_viewemail);
}
if (isset($attachsig)) {
$newuser->setVar("attachsig", $attachsig);
}
$newuser->setVar("name", $name);
$newuser->setVar("uname", $uname);
$newuser->setVar("email", $email);
$newuser->setVar("url", formatURL($url));
$newuser->setVar("user_avatar", 'blank.gif');
$newuser->setVar("user_icq", $user_icq);
$newuser->setVar("user_from", $user_from);
$newuser->setVar("user_sig", $user_sig);
$newuser->setVar("user_aim", $user_aim);
$newuser->setVar("user_yim", $user_yim);
$newuser->setVar("user_msnm", $user_msnm);
if ($pass2 != "") {
if ($pass != $pass2) {
xoops_cp_header();
echo "\r\n\t\t\t\t\t<b>" . _AM_STNPDNM . "</b>";
xoops_cp_footer();
exit;
}
$newuser->setVar("pass", md5($pass));
开发者ID:amjadtbssm,项目名称:website,代码行数:31,代码来源:main.php
示例5: implode
if (!$GLOBALS['xoopsSecurity']->check()) {
$stop .= implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()) . "<br />";
}
xoops_load("captcha");
$xoopsCaptcha = XoopsCaptcha::getInstance();
if (!$xoopsCaptcha->verify()) {
$stop .= $xoopsCaptcha->getMessage() . "<br />";
}
if (empty($stop)) {
$member_handler =& xoops_gethandler('member');
$newuser =& $member_handler->createUser();
$newuser->setVar('user_viewemail', $user_viewemail, true);
$newuser->setVar('uname', $uname, true);
$newuser->setVar('email', $email, true);
if ($url != '') {
$newuser->setVar('url', formatURL($url), true);
}
$newuser->setVar('user_avatar', 'blank.gif', true);
$actkey = substr(md5(uniqid(mt_rand(), 1)), 0, 8);
$newuser->setVar('actkey', $actkey, true);
$newuser->setVar('pass', md5($pass), true);
$newuser->setVar('timezone_offset', $timezone_offset, true);
$newuser->setVar('user_regdate', time(), true);
$newuser->setVar('uorder', $xoopsConfig['com_order'], true);
$newuser->setVar('umode', $xoopsConfig['com_mode'], true);
$newuser->setVar('user_mailok', $user_mailok, true);
if ($xoopsConfigUser['activation_type'] == 1) {
$newuser->setVar('level', 1, true);
} else {
$newuser->setVar('level', 0, true);
}
开发者ID:yunsite,项目名称:xoopsdc,代码行数:31,代码来源:register.php
示例6: formatURL
<?php
}
?>
<?php
if ($wpInfo->link) {
?>
<tr bgcolor="#F2ECDB">
<td width=200><?php
echo _SITE_LINK;
?>
</td>
<td valign="top"><a href='<?php
echo formatURL($wpInfo->link);
?>
' target="_blank"><?php
echo formatURL($wpInfo->link);
?>
</a> </td>
</tr>
<?php
}
?>
<?php
if ($wpInfo->description) {
?>
<tr bgcolor="#F2ECDB">
<td width=200><?php
echo _SITE_DESCR;
?>
</td>
<td valign="top"><?php
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:GUI_EXT_waypoint_info.php
示例7: formatSpeed
$Ltemplate->assign_vars(array('MAX_SPEED' => formatSpeed($flight->MAX_SPEED), 'MAX_VARIO' => formatVario($flight->MAX_VARIO), 'MEAN_SPEED' => formatSpeed($flight->MEAN_SPEED), 'MIN_VARIO' => formatVario($flight->MIN_VARIO)));
if ($flight->is3D()) {
$Ltemplate->assign_vars(array('MAX_ALT' => formatAltitude($flight->MAX_ALT), 'TAKEOFF_ALT' => formatAltitude($flight->TAKEOFF_ALT), 'MIN_ALT' => formatAltitude($flight->MIN_ALT), 'ALTITUDE_GAIN' => formatAltitude($flight->MAX_ALT - $flight->TAKEOFF_ALT)));
} else {
$Ltemplate->assign_vars(array('MAX_ALT' => 0, 'TAKEOFF_ALT' => 0, 'MIN_ALT' => 0, 'ALTITUDE_GAIN' => 0));
}
/* $flight->filename
echo "<div id='geOptionsPos' style='float:right'>";
echo "<a href='javascript:nop()' onclick=\"toggleVisible('geOptionsID','geOptionsPos',14,-80,170,'auto');return false;\">Google Earth <img src='".$moduleRelPath."/img/icon_arrow_down.gif' border=0></a></div>";
*/
if ($flight->comments) {
$comments = $flight->comments;
}
$linkURL = _N_A;
if ($flight->linkURL) {
$linkURL = "<a href='" . formatURL($flight->linkURL, 0) . "' title='" . formatURL($flight->linkURL, 0) . "' target=_blank>" . formatURL($flight->linkURL, 15) . "</a>";
}
$flightBrandID = $row['gliderBrandID'];
//$flightBrandID=guessBrandID($flight->cat,$flight->glider);
$gliderBrandImg = brands::getBrandImg($flight->gliderBrandID, $flight->glider, $flight->cat);
$glider = $gliderBrandImg . ' ' . $flight->glider;
$gliderCat = " [ " . leoHtml::img("icon_cat_" . $flight->cat . ".png", 0, 0, 'absmiddle', '', 'icons1') . " " . $gliderCatList[$flight->cat] . " ]";
//-------------------------------------------------------------------
// get from paraglidingearth.com
//-------------------------------------------------------------------
$takoffsList = getExtrernalServerTakeoffs(1, $firstPoint->lat, -$firstPoint->lon, 50, 5);
if (count($takoffsList) > 0) {
$linkToInfoHdr1 = "<a href='http://www.paraglidingearth.com/en-html/sites_around.php?lng=" . -$firstPoint->lon . "&lat=" . $firstPoint->lat . "&dist=20' target=_blank>";
$linkToInfoHdr1 .= "<img src='" . $moduleRelPath . "/img/paraglidingearth_logo.gif' border=0> " . _FLYING_AREA_INFO . "</a>";
$linkToInfoStr1 = "<ul>";
foreach ($takoffsList as $takeoffItem) {
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:31,代码来源:GUI_flight_show_ext.php
示例8: userCheck
$stop_reason = userCheck($allowed_requests['uname'], $email4check, $allowed_requests['pass'], $allowed_requests['vpass']);
}
if (!empty($_POST['do_register']) && empty($stop_reason_extras) && empty($stop_reason)) {
if ($xoopsConfigUser['reg_dispdsclmr'] && empty($allowed_requests['agree_disc'])) {
die(_US_UNEEDAGREE);
}
include XOOPS_ROOT_PATH . '/header.php';
$member_handler =& xoops_gethandler('member');
$newuser =& $member_handler->createUser();
if ($allow_blank_email) {
$newuser->initVar('email', XOBJ_DTYPE_TXTBOX, null, false, 60);
}
$newuser->setVar('user_viewemail', $allowed_requests['user_viewemail'], true);
$newuser->setVar('uname', $allowed_requests['uname'], true);
$newuser->setVar('email', $allowed_requests['email'], true);
$newuser->setVar('url', formatURL($allowed_requests['url']), true);
$newuser->setVar('user_avatar', 'blank.gif', true);
$actkey = substr(md5(uniqid(mt_rand(), 1)), 0, 8);
$newuser->setVar('actkey', $actkey, true);
$newuser->setVar('pass', md5($allowed_requests['pass']), true);
$newuser->setVar('timezone_offset', $allowed_requests['timezone_offset'], true);
$newuser->setVar('user_regdate', time(), true);
$newuser->setVar('uorder', $xoopsConfig['com_order'], true);
$newuser->setVar('umode', $xoopsConfig['com_mode'], true);
$newuser->setVar('user_mailok', $allowed_requests['user_mailok'], true);
if ($xoopsConfigUser['activation_type'] == 1) {
$newuser->setVar('level', 1, true);
}
if (!$member_handler->insertUser($newuser)) {
echo _US_REGISTERNG;
include XOOPS_ROOT_PATH . '/footer.php';
开发者ID:BackupTheBerlios,项目名称:peakxoops-svn,代码行数:31,代码来源:registerhook.php
示例9: updateUser
function updateUser($uid, $uname, $name, $url, $email, $user_icq, $user_aim, $user_yim, $user_msnm, $user_from, $user_occ, $user_intrest, $user_viewemail, $user_avatar, $user_sig, $attachsig, $theme, $pass, $pass2, $rank, $bio, $uorder, $umode, $notify_method, $notify_mode, $timezone_offset, $user_mailok, $groups = array())
{
global $xoopsConfig, $xoopsDB, $xoopsModule;
$member_handler =& xoops_gethandler('member');
$edituser =& $member_handler->getUser($uid);
if ($edituser->getVar('uname') != $uname && $member_handler->getUserCount(new Criteria('uname', $uname)) > 0) {
xoops_cp_header();
echo 'User name ' . $uname . ' already exists';
xoops_cp_footer();
} else {
$edituser->setVar("name", $name);
$edituser->setVar("uname", $uname);
$edituser->setVar("email", $email);
$url = isset($url) ? formatURL($url) : '';
$edituser->setVar("url", $url);
// $edituser->setVar("user_avatar", $user_avatar);
$edituser->setVar("user_icq", $user_icq);
$edituser->setVar("user_from", $user_from);
$edituser->setVar("user_sig", $user_sig);
$user_viewemail = isset($user_viewemail) && $user_viewemail == 1 ? 1 : 0;
$edituser->setVar("user_viewemail", $user_viewemail);
$edituser->setVar("user_aim", $user_aim);
$edituser->setVar("user_yim", $user_yim);
$edituser->setVar("user_msnm", $user_msnm);
$attachsig = isset($attachsig) && $attachsig == 1 ? 1 : 0;
$edituser->setVar("attachsig", $attachsig);
$edituser->setVar("timezone_offset", $timezone_offset);
// $edituser->setVar("theme", $theme);
$edituser->setVar("uorder", $uorder);
$edituser->setVar("umode", $umode);
// RMV-NOTIFY
$edituser->setVar("notify_method", $notify_method);
$edituser->setVar("notify_mode", $notify_mode);
$edituser->setVar("bio", $bio);
$edituser->setVar("rank", $rank);
$edituser->setVar("user_occ", $user_occ);
$edituser->setVar("user_intrest", $user_intrest);
$edituser->setVar('user_mailok', $user_mailok);
if ($pass2 != "") {
if ($pass != $pass2) {
xoops_cp_header();
echo "\n <strong>" . _AM_STNPDNM . "</strong>";
xoops_cp_footer();
exit;
}
$edituser->setVar("pass", md5($pass));
}
if (!$member_handler->insertUser($edituser)) {
xoops_cp_header();
echo $edituser->getHtmlErrors();
xoops_cp_footer();
} else {
if ($groups != array()) {
global $xoopsUser;
$oldgroups = $edituser->getGroups();
//If the edited user is the current user and the current user WAS in the webmaster's group and is NOT in the new groups array
if ($edituser->getVar('uid') == $xoopsUser->getVar('uid') && in_array(XOOPS_GROUP_ADMIN, $oldgroups) && !in_array(XOOPS_GROUP_ADMIN, $groups)) {
//Add the webmaster's group to the groups array to prevent accidentally removing oneself from the webmaster's group
array_push($groups, XOOPS_GROUP_ADMIN);
}
$member_handler =& xoops_gethandler('member');
foreach ($oldgroups as $groupid) {
$member_handler->removeUsersFromGroup($groupid, array($edituser->getVar('uid')));
}
foreach ($groups as $groupid) {
$member_handler->addUserToGroup($groupid, $edituser->getVar('uid'));
}
}
redirect_header("admin.php?fct=users", 1, _AM_DBUPDATED);
}
}
exit;
}
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:73,代码来源:users.php
示例10: extract
include "header.php";
$xoopsOption['template_main'] = 'xoopspartners_join.html';
include XOOPS_ROOT_PATH . "/header.php";
$myts =& MyTextSanitizer::getInstance();
if ($xoopsUser) {
if ($HTTP_POST_VARS['op'] == "sendMail") {
extract($HTTP_POST_VARS);
include XOOPS_ROOT_PATH . "/class/xoopsmailer.php";
if (empty($title) or empty($url) or empty($description) or $url == "http://") {
$xoopsTpl->assign(array("content4join" => _MD_ERROR1, "lang_main_partner" => _MD_PARTNERS, "sitename" => $xoopsConfig['sitename']));
$xoopsContentsTpl = 'partnerjoin.html';
include_once XOOPS_ROOT_PATH . '/footer.php';
exit;
}
$url = formatURL($myts->makeTboxData4Show($url));
$image = formatURL($myts->makeTboxData4Show($image));
$title = $myts->makeTboxData4Show($title);
$description = $myts->makeTboxData4Show($description);
$imageInfo = @getimagesize($image);
$imageWidth = $imageInfo[0];
$imageHeight = $imageInfo[1];
$type = $imageInfo[2];
if ($type == 0) {
$xoopsTpl->assign(array("content4join" => _MD_ERROR3, "lang_main_partner" => _MD_PARTNERS, "sitename" => $xoopsConfig['sitename']));
$xoopsContentsTpl = 'partnerjoin.html';
include_once XOOPS_ROOT_PATH . '/footer.php';
exit;
}
if ($imageWidth >= 110 or $imageHeight >= 50) {
$xoopsTpl->assign(array("content4join" => _MD_ERROR2, "lang_main_partner" => _MD_PARTNERS, "sitename" => $xoopsConfig['sitename']));
$xoopsContentsTpl = 'partnerjoin.html';
开发者ID:amjadtbssm,项目名称:website,代码行数:31,代码来源:join.php
示例11: htmlspecialchars
// ------------------------------------------------------------------------- //
include "header.php";
$xoopsOption['template_main'] = 'xoopspartners_join.html';
include XOOPS_ROOT_PATH . "/header.php";
$myts =& MyTextSanitizer::getInstance();
if ($xoopsUser) {
if (!empty($_POST['op']) && $_POST['op'] == "sendMail") {
include XOOPS_ROOT_PATH . "/class/xoopsmailer.php";
if (empty($_POST['title']) or empty($_POST['url']) or empty($_POST['description']) or $_POST['url'] == "http://") {
$xoopsTpl->assign(array("content4join" => _MD_ERROR1, "lang_main_partner" => _MD_PARTNERS, "sitename" => htmlspecialchars($xoopsConfig['sitename'])));
$xoopsContentsTpl = 'partnerjoin.html';
include_once XOOPS_ROOT_PATH . '/footer.php';
exit;
}
$url = formatURL($myts->makeTboxData4Show($_POST['url']));
$image = formatURL($myts->makeTboxData4Show($_POST['image']));
$title = $myts->makeTboxData4Show($_POST['title']);
$description = $myts->makeTboxData4Show($_POST['description']);
$imageInfo = @getimagesize($image);
$imageWidth = $imageInfo[0];
$imageHeight = $imageInfo[1];
$type = $imageInfo[2];
if ($type == 0) {
$xoopsTpl->assign(array("content4join" => _MD_ERROR3, "lang_main_partner" => _MD_PARTNERS, "sitename" => htmlspecialchars($xoopsConfig['sitename'])));
$xoopsContentsTpl = 'partnerjoin.html';
include_once XOOPS_ROOT_PATH . '/footer.php';
exit;
}
if ($imageWidth >= 110 or $imageHeight >= 50) {
$xoopsTpl->assign(array("content4join" => _MD_ERROR2, "lang_main_partner" => _MD_PARTNERS, "sitename" => htmlspecialchars($xoopsConfig['sitename'])));
$xoopsContentsTpl = 'partnerjoin.html';
开发者ID:koki-h,项目名称:xoops_utf8,代码行数:31,代码来源:join.php
示例12: count
$onecat =& $categories[$id];
$cat_element_id = "cat_" . $onecat['cat_id'];
$expand = count($toggles) > 0 ? in_array($cat_element_id, $toggles) ? false : true : true;
$cat_display = $expand ? 'block;' : 'none;';
$cat_icon_display = $expand ? $category_icon["expand"] : $category_icon["collapse"];
if (isset($forumsByCat[$onecat['cat_id']])) {
$forums =& $forumsByCat[$onecat['cat_id']];
}
$cat_sponsor = array();
@(list($url, $title) = array_map("trim", preg_split("/ /", $onecat['cat_url'], 2)));
if (empty($title)) {
$title = $url;
}
$title = $myts->htmlSpecialChars($title);
if (!empty($url)) {
$cat_sponsor = array("title" => $title, "link" => formatURL($url));
}
$cat_image = $onecat['cat_image'];
if (!empty($cat_image) && $cat_image != "blank.gif") {
$cat_image = XOOPS_URL . "/modules/" . $xoopsModule->getVar("dirname", "n") . "/images/category/" . $cat_image;
} else {
$cat_image = "";
}
$category_array[] = array('cat_id' => $onecat['cat_id'], 'cat_title' => $myts->displayTarea($onecat['cat_title'], 1), 'cat_image' => $cat_image, 'cat_sponsor' => $cat_sponsor, 'cat_description' => $myts->displayTarea($onecat['cat_description'], 1), 'cat_element_id' => $cat_element_id, 'cat_display' => $cat_display, 'cat_icon_display' => $cat_icon_display, 'forums' => $forums);
}
unset($categories, $forums_array, $forumsByCat);
$xoopsTpl->assign_by_ref("category_icon", $category_icon);
$xoopsTpl->assign_by_ref("categories", $category_array);
$xoopsTpl->assign(array("index_title" => sprintf(_MD_WELCOME, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)), "index_desc" => _MD_TOSTART));
/* display user stats */
$userstats = array();
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:31,代码来源:index.php
示例13: makeWaypointPlacemark
function makeWaypointPlacemark($waypointID, $returnCountryCode = 0, $includeStyle = 1, $includeLookat = 1, $styleUrl = '')
{
global $db, $waypointsTable;
global $flightsTable, $countries, $CONF_mainfile, $moduleRelPath;
$wpInfo = new waypoint($waypointID);
$wpInfo->getFromDB();
$wpName = selectWaypointName($wpInfo->name, $wpInfo->intName, $wpInfo->countryCode);
$wpLocation = selectWaypointLocation($wpInfo->location, $wpInfo->intLocation, $wpInfo->countryCode);
$query = "SELECT MAX(MAX_LINEAR_DISTANCE) as record_km, ID FROM {$flightsTable} WHERE takeoffID =" . $waypointID . " GROUP BY ID ORDER BY record_km DESC ";
$flightNum = 0;
$res = $db->sql_query($query);
if ($res > 0) {
$flightNum = mysql_num_rows($res);
$row = $db->sql_fetchrow($res);
$siteRecordLink = "<a href='http://" . $_SERVER['SERVER_NAME'] . getLeonardoLink(array('op' => 'show_flight', 'flightID' => $row['ID'])) . "'>" . formatDistance($row['record_km'], 1) . "</a>";
} else {
$siteRecordLink = "";
}
$pointFlightsLink = "<a href='http://" . $_SERVER['SERVER_NAME'] . getLeonardoLink(array('op' => 'list_flights', 'takeoffID' => $waypointID, 'year' => '0', 'season' => '0')) . "'>" . _See_flights_near_this_point . " [ " . $flightNum . " ]</a>";
$countryFlightsLink = "<a href='http://" . $_SERVER['SERVER_NAME'] . getLeonardoLink(array('op' => 'list_flights', 'takeoffID' => '0', 'year' => '0', 'season' => '0', 'country' => $wpInfo->countryCode)) . "'>" . $countries[$wpInfo->countryCode] . "</a>";
if ($wpInfo->link) {
$siteLink = '<a href="' . formatURL($wpInfo->link) . '" target="_blank">' . formatURL($wpInfo->link) . '</a>';
} else {
$siteLink = "-";
}
// "<?xml version='1.0' encoding='".$langEncodings[$currentlang]."'? >
// <?xml version="1.0" encoding="UTF-8"? >
$xml_text = '<Placemark>
<name><![CDATA[' . $wpName . ' ]]></name>
<description><![CDATA[<table cellpadding=0 cellspacing=0 width=300>' . '<tr bgcolor="#D7E1EE"><td>' . _SITE_REGION . ': ' . $wpLocation . ' - ' . $countryFlightsLink . '</td></tr>' . '<tr bgcolor="#CCCCCC"><td>' . $pointFlightsLink . '</td></tr>' . '<tr ><td>' . _SITE_RECORD . ' : ' . $siteRecordLink . '</td></tr>' . '<tr bgcolor="#CCCCCC"><td>' . _SITE_LINK . ' : ' . $siteLink . '</td></tr>' . '<tr ><td>' . $wpInfo->description . '</td></tr>' . '<tr ><td></td></tr>' . '</table>
]]>
</description>';
if ($includeLookat) {
$xml_text .= '
<LookAt>
<longitude>' . -$wpInfo->lon . '</longitude>
<latitude>' . $wpInfo->lat . '</latitude>
<range>10000</range>
<tilt>0</tilt>
<heading>0</heading>
</LookAt>
';
}
if ($includeStyle) {
$xml_text .= '
<styleUrl>root://styleMaps#default+nicon=0x307+hicon=0x317</styleUrl>
<Style>
<IconStyle>
<scale>0.8</scale>
<Icon>
<href>root://icons/palette-4.png</href>
<x>160</x>
<y>128</y>
<w>32</w>
<h>32</h>
</Icon>
</IconStyle>
<LabelStyle>
<scale>0.8</scale>
</LabelStyle>
</Style>
';
}
if ($styleUrl) {
$xml_text .= "<styleUrl>{$styleUrl}</styleUrl>\n";
}
$xml_text .= '
<Point>
<coordinates>' . -$wpInfo->lon . ',' . $wpInfo->lat . ',0</coordinates>
</Point>
</Placemark>';
if ($returnCountryCode) {
return array($xml_text, $wpInfo->countryCode);
} else {
return $xml_text;
}
}
开发者ID:Peter2121,项目名称:leonardoxc,代码行数:77,代码来源:FN_waypoint.php
示例14: xoops_create_user
function xoops_create_user($username, $password, $user, $siteinfo)
{
xoops_load("userUtility");
global $xoopsModuleConfig, $xoopsConfig;
if ($xoopsModuleConfig['site_user_auth'] == 1) {
if ($ret = check_for_lock(basename(__FILE__), $username, $password)) {
return $ret;
}
if (!checkright(basename(__FILE__), $username, $password)) {
mark_for_lock(basename(__FILE__), $username, $password);
return array('ErrNum' => 9, "ErrDesc" => 'No Permission for plug-in');
}
}
return array("Username" => $username, "password" => $password, 'user' => $user, 'siteinfo' => $siteinfo);
if ($user['passhash'] != '') {
if ($user['passhash'] != sha1($user['time'] - $user['rand'] . $user['uname'] . $user['pass'])) {
return array("ERRNUM" => 4, "ERRTXT" => 'No Passhash');
}
} else {
return array("ERRNUM" => 4, "ERRTXT" => 'No Passhash');
}
foreach ($user as $k => $l) {
${$k} = $l;
}
include_once XOOPS_ROOT_PATH . '/class/auth/authfactory.php';
include_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/auth.php';
$xoopsAuth =& XoopsAuthFactory::getAuthConnection($uname);
if (check_auth_class($xoopsAuth) == true) {
$result = $xoopsAuth->create_user($user_viewemail, $uname, $email, $url, $actkey, $pass, $timezone_offset, $user_mailok, $siteinfo);
return $result;
} else {
if (strlen(userCheck($uname, $email, $pass, $pass)) == 0) {
global $xoopsConfig;
$config_handler =& xoops_gethandler('config');
$xoopsConfigUser =& $config_handler->getConfigsByCat(XOOPS_CONF_USER);
$member_handler =& xoops_gethandler('member');
$newuser =& $member_handler->createUser();
$newuser->setVar('user_viewemail', $user_viewemail, true);
$newuser->setVar('uname', $uname, true);
$newuser->setVar('email', $email, true);
if ($url != '') {
$newuser->setVar('url', formatURL($url), true);
}
$newuser->setVar('user_avatar', 'blank.gif', true);
if (empty($actkey)) {
$actkey = substr(md5(uniqid(mt_rand(), 1)), 0, 8);
}
$newuser->setVar('actkey', $actkey, true);
$newuser->setVar('pass', md5($pass), true);
$newuser->setVar('timezone_offset', $timezone_offset, true);
$newuser->setVar('user_regdate', time(), true);
$newuser->setVar('uorder', $xoopsConfig['com_order'], true);
$newuser->setVar('umode', $xoopsConfig['com_mode'], true);
$newuser->setVar('user_mailok', $user_mailok, true);
$newuser->setVar('user_intrest', _US_USERREG . ' @ ' . $xoops_url, true);
if ($xoopsConfigUser['activation_type'] == 1) {
$newuser->setVar('level', 1, true);
}
if (!$member_handler->insertUser($newuser, true)) {
$return = array('state' => 1, "text" => _US_REGISTERNG);
} else {
$newid = $newuser->getVar('uid');
if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newid)) {
$return = array('state' => 1, "text" => _US_REGISTERNG);
}
if ($xoopsConfigUser['activation_type'] == 1) {
$return = array('state' => 2, "user" => $uname);
}
// Sending notification email to user for self activation
if ($xoopsConfigUser['activation_type'] == 0) {
$xoopsMailer =& xoops_getMailer();
$xoopsMailer->useMail();
$xoopsMailer->setTemplate('register.tpl');
$xoopsMailer->assign('SITENAME', $siteinfo['sitename']);
$xoopsMailer->assign('ADMINMAIL', $siteinfo['adminmail']);
$xoopsMailer->assign('SITEURL', XOOPS_URL . "/");
$xoopsMailer->setToUsers(new XoopsUser($newid));
$xoopsMailer->setFromEmail($siteinfo['adminmail']);
$xoopsMailer->setFromName($siteinfo['sitename']);
$xoopsMailer->setSubject(sprintf(_US_USERKEYFOR, $uname));
if (!$xoopsMailer->send()) {
$return = array('state' => 1, "text" => _US_YOURREGMAILNG);
} else {
$return = array('state' => 1, "text" => _US_YOURREGISTERED);
}
// Sending notification email to administrator for activation
} elseif ($xoopsConfigUser['activation_type'] == 2) {
$xoopsMailer =& xoops_getMailer();
$xoopsMailer->useMail();
$xoopsMailer->setTemplate('adminactivate.tpl');
$xoopsMailer->assign('USERNAME', $uname);
$xoopsMailer->assign('USEREMAIL', $email);
if ($siteinfo['xoops_url'] == XOOPS_URL) {
$xoopsMailer->assign('USERACTLINK', $siteinfo['xoops_url'] . '/register.php?op=actv&id=' . $newid . '&actkey=' . $actkey);
}
} else {
$xoopsMailer->assign('USERACTLINK', $siteinfo['xoops_url'] . '/register.php?op=actv&uname=' . $uname . '&actkey=' . $actkey);
}
$xoopsMailer->assign('SITENAME', $siteinfo['sitename']);
$xoopsMailer->assign('ADMINMAIL', $siteinfo['adminmail']);
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:haxoo-svn,代码行数:101,代码来源:xoops_create_user.php
示例15: count
$total = count($titles);
$count = 0;
foreach ($titles as $key => $value) {
$count++;
echo $count . "/" . $total . " - " . $value . " - " . $key . "\n";
echo "Testando IAH - indice de Autor \n";
$URL = "http://" . $domain . "/cgi-bin/wxis.exe/iah/?IsisScript=iah/iah.xis&base=article^d" . $value . "&index=AU&format=iso.pft&lang=i&limit=" . $key;
$content = file_get_contents(formatURL($URL));
getErrors($content, $URL);
echo "Testando IAH - indice de Autor letra A \n";
$URL = "http://" . $domain . "/cgi-bin/wxis.exe/iah/?IsisScript=iah/iah.xis&base=article^d" . $value . "&index=AU&format=iso.pft&lang=i&limit=" . $key . " &indexRoot=A&nextAction=show index&selectedIndex=^l1^nAu^pAutor^eAutor^iAuthor^xAU ^yPREINV^uAU_^mAU_&indexSearch=^nAu^pAutor^eAutor^iAuthor^xAU ^yPREINV^uAU_^mAU_";
$content = file_get_contents(formatURL($URL));
getErrors($content, $URL);
echo "Testando IAH - indice de Assunto letra A \n";
$URL = "http://" . $domain . "/cgi-bin/wxis.exe/iah/?IsisScript=iah/iah.xis&base=article^d" . $value . "&index=AU&format=iso.pft&lang=i&limit=" . $key . "&indexRoot=A&nextAction=show index&selectedIndex=^l1^nKw^pAssunto^eMateria^iSubject^xKW ^yPREINV^uKW_^mKW_&indexSearch=^nKw^pAssunto^eMateria^iSubject^xKW ^yPREINV^uKW_^mKW_";
$content = file_get_contents(formatURL($URL));
getErrors($content, $URL);
echo "Testando IAH - indice de Resumo letra A \n";
$URL = "http://" . $domain . "/cgi-bin/wxis.exe/iah/?IsisScript=iah/iah.xis&base=article^d" . $value . "&format=iso.pft&lang=i&limit=" . $key . "&indexRoot=A&nextAction=show index&selectedIndex=^l1^nAb^pResumo^eResumen^iAbstract^xAB ^yPREINV^uAB_^mAB_&indexSearch=^nAb^pResumo^eResumen^iAbstract^xAB ^yPREINV^uAB_^mAB_";
$content = file_get_contents(formatURL($URL));
getErrors($content, $URL);
echo "Testando IAH - indice de Titulo letra A \n";
$URL = "http://" . $domain . "/cgi-bin/wxis.exe/iah/?IsisScript=iah/iah.xis&base=article^d" . $value . "&format=iso.pft&lang=i&limit=" . $key . "&indexRoot=A&nextAction=show index&selectedIndex=^l1^nTi^pPalavras do título^ePalabras del título^iTitle words^xTI ^yPREINV^uTI_^mTI_&indexSearch=^nTi^pPalavras do título^ePalabras del título^iTitle words^xTI ^yPREINV^uTI_^mTI_";
$content = file_get_contents(formatURL($URL));
getErrors($content, $URL);
echo "Testando IAH - indice de Ano de Publicacao \n";
$URL = "http://" . $domain . "/cgi-bin/wxis.exe/iah/?IsisScript=iah/iah.xis&base=article^d" . $value . "&format=iso.pft&lang=i&limit=" . $key . "&nextAction=show index&selectedIndex=^l1^nYr^pAno de publicação^eAño de publicación^iPublication year^xYR ^yPREINV^uYR_^mYR_^tshort&indexSearch=^nYr^pAno de publicação^eAño de publicación^iPublication year^xYR ^yPREINV^uYR_^mYR_^tshort";
$content = file_get_contents(formatURL($URL));
getErrors($content, $URL);
}
echo "DONE";
开发者ID:Ethennoob,项目名称:Web,代码行数:31,代码来源:unittest_iahGeral.php
|
请发表评论