function generateCouponCode() { $code = "UNI" . substr(date("Y"), 2, 2) . date("m") . date("d") . date("his"); $code .= mt_rand(11111, 99999); $codeExist = getFieldValue("code", "coupon", "WHERE code='" . $code . "'"); if (empty($codeExist)) { return $code; } else { generateCouponCode(); } }
function sendMail() { $to = getFieldValue('email'); $subject = 'Notification: Your bio was just updated'; $message = 'Your bio was updated on ' . date('o-m-d') . ' at ' . date('H:m:s') . "\r\n"; $message .= 'First Name: ' . getFieldValue('firstName') . "\r\n"; $message .= 'Last Name: ' . getFieldValue('lastName') . "\r\n"; $message .= 'Age: ' . getFieldValue('age') . "\r\n"; $message .= 'Email: ' . $to . "\r\n"; $message .= 'Short Bio: ' . getFieldValue('shortBio') . "\r\n"; $message = wordwrap($message, 70); $headers = array('From: ' . MY_EMAIL, 'X-Priority: 1 (highest)'); $headers = implode("\r\n", $headers); var_dump('$to:' . $to); var_dump('$subject:' . $subject); var_dump('$message:' . $message); var_dump('$headers:' . $headers); // email does not work in windows! $boolResult = mail($to, $subject, $message, $headers); var_dump($boolResult); return $boolResult; }
/** * Generates the menu and user status to display on the user profile by calling back $this->addMenu * @param moscomprofilerTab $tab the tab database entry * @param moscomprofilerUser $user the user being displayed * @param int $ui 1 for front-end, 2 for back-end * @return boolean either true, or false if ErrorMSG generated */ function getMenuAndStatus( $tab, $user, $ui ) { global $_CB_framework, $_CB_database, $ueConfig,$_REQUEST,$_POST; $params = $this->params; $Itemid = getCBprofileItemid( 0 ); // Build basic menu: $ue_base_url = "index.php?option=com_comprofiler"; if ( $Itemid ) { $ue_base_url .= "&Itemid=" . $Itemid; // Base URL string } $ue_credits_url = $ue_base_url."&task=teamCredits"; $ue_userdetails_url = $ue_base_url."&task=userDetails" . $this->_addUid( $user ); $ue_useravatar_url = $ue_base_url."&task=userAvatar" . $this->_addUid( $user ); $ue_deleteavatar_url = $ue_base_url."&task=userAvatar&do=deleteavatar" . $this->_addUid( $user ); $ue_unbanrequest_url = $ue_base_url."&task=banProfile&act=2&reportform=1&uid=".$user->id; $ue_banhistory_url = $ue_base_url."&task=moderateBans&act=2&uid=".$user->id; $ue_ban_url = $ue_base_url."&task=banProfile&act=1&uid=".$user->id; $ue_unban_url = $ue_base_url."&task=banProfile&act=0&reportform=0&uid=".$user->id; $ue_reportuser_url = $ue_base_url."&task=reportUser&uid=".$user->id; $ue_viewuserreports_url = $ue_base_url."&task=viewReports&uid=".$user->id; $ue_viewOlduserreports_url = $ue_base_url."&task=viewReports&act=1&uid=".$user->id; $ue_approve_image_url= $ue_base_url."&task=approveImage&flag=1&avatars=".$user->id; $ue_reject_image_url = $ue_base_url."&task=approveImage&flag=0&avatars=".$user->id; $ue_userprofile_url = $ue_base_url.""; $adminimagesdir = $_CB_framework->getCfg( 'live_site' ) . '/components/com_comprofiler/images/'; // $this->menuBar->set("class", "mainlevel"); //BB: hardcoded to check >RC2. $firstMenuName = $params->get('firstMenuName', '_UE_MENU_CB'); $firstSubMenuName = $params->get('firstSubMenuName', '_UE_MENU_ABOUT_CB'); $firstSubMenuHref = $params->get('firstSubMenuHref', $ue_credits_url); $secondSubMenuName = $params->get('secondSubMenuName', ''); $secondSubMenuHref = $params->get('secondSubMenuHref', ''); if ($firstMenuName != "") { $mi = array(); $mi[$firstMenuName]=''; // $this->_addMenuItem( $mi,$firstMenuName,"javascript:void(0)" ); // Community if ($firstSubMenuName != "") { unset($mi); if ($firstSubMenuHref == "") $firstSubMenuHref = "javascript:void(0)"; $mi = array(); $mi[$firstMenuName]["_UE_TEAMCREDITS_CB"]=''; $this->_addMenuItem( $mi,getLangDefinition($firstSubMenuName),cbSef($firstSubMenuHref) ); // About... if ($secondSubMenuName != "") { if ($secondSubMenuHref == "") $secondSubMenuHref = "javascript:void(0)"; $mi = array(); $mi[$firstMenuName]["_UE_SECOND"]=''; $this->_addMenuItem( $mi,getLangDefinition($secondSubMenuName),cbSef($secondSubMenuHref) ); // Free... } } } // ----- VIEW MENU - BEFORE EDIT MENU IF NOT VIEWING A PROFILE ----- if ( $_CB_framework->myId() > 0 ) { // View My Profile: if ( $_CB_framework->displayedUser() === null ) { $mi = array(); $mi["_UE_MENU_VIEW"]["_UE_MENU_VIEWMYPROFILE"]=null; $this->_addMenuItem( $mi, _UE_MENU_VIEWMYPROFILE,cbSef($ue_userprofile_url), "", "","", _UE_MENU_VIEWMYPROFILE_DESC,"" ); } } // ----- EDIT MENU ----- if ( ! cbCheckIfUserCanPerformUserTask( $user->id, 'allowModeratorsUserEdit') ) { if ( $user->id == $_CB_framework->myId() ) { $menuTexts = array( '_UE_UPDATEPROFILE' => _UE_UPDATEPROFILE, '_UE_MENU_UPDATEPROFILE_DESC' => _UE_MENU_UPDATEPROFILE_DESC, '_UE_UPDATEAVATAR' => _UE_UPDATEAVATAR, '_UE_MENU_UPDATEAVATAR_DESC' => _UE_MENU_UPDATEAVATAR_DESC, '_UE_DELETE_AVATAR' => _UE_DELETE_AVATAR, '_UE_MENU_DELETE_AVATAR_DESC' => _UE_MENU_DELETE_AVATAR_DESC ); } else { $menuTexts = array( '_UE_UPDATEPROFILE' => _UE_MOD_MENU_UPDATEPROFILE, '_UE_MENU_UPDATEPROFILE_DESC' => _UE_MOD_MENU_UPDATEPROFILE_DESC, '_UE_UPDATEAVATAR' => _UE_MOD_MENU_UPDATEAVATAR, '_UE_MENU_UPDATEAVATAR_DESC' => _UE_MOD_MENU_UPDATEAVATAR_DESC, '_UE_DELETE_AVATAR' => _UE_MOD_MENU_DELETE_AVATAR, '_UE_MENU_DELETE_AVATAR_DESC' => _UE_MOD_MENU_DELETE_AVATAR_DESC ); } // Update Profile: $mi = array(); $mi["_UE_MENU_EDIT"]["_UE_UPDATEPROFILE"]=null; $this->_addMenuItem( $mi, $menuTexts['_UE_UPDATEPROFILE'],cbSef($ue_userdetails_url), "", "<img src=\"".$adminimagesdir."updateprofile.gif\" alt='' />","", $menuTexts['_UE_MENU_UPDATEPROFILE_DESC'],"" ); // Update Avatar: if($ueConfig['allowAvatar']==1 && ($ueConfig['allowAvatarUpload']==1 || $ueConfig['allowAvatarGallery']==1)) { $mi = array(); $mi["_UE_MENU_EDIT"]["_UE_UPDATEAVATAR"]=null; $this->_addMenuItem( $mi, $menuTexts['_UE_UPDATEAVATAR'],cbSef($ue_useravatar_url), "", "<img src=\"".$adminimagesdir."newavatar.gif\" alt='' />","", $menuTexts['_UE_MENU_UPDATEAVATAR_DESC'],"" ); // Delete Avatar: if($user->avatar!='' && $user->avatar!=null) { $mi = array(); $mi["_UE_MENU_EDIT"]["_UE_DELETE_AVATAR"]=null; $this->_addMenuItem( $mi, $menuTexts['_UE_DELETE_AVATAR'],cbSef($ue_deleteavatar_url), "", "<img src=\"".$adminimagesdir."delavatar.gif\" alt='' />","", $menuTexts['_UE_MENU_DELETE_AVATAR_DESC'],"" ); } } } // ----- VIEW MENU - AFTER EDIT IF VIEWING A PROFILE ----- if ( $_CB_framework->myId() > 0 ) { // View My Profile: if ( ( $_CB_framework->myId() != $user->id ) && ( $_CB_framework->displayedUser() !== null ) ) { $mi = array(); $mi["_UE_MENU_VIEW"]["_UE_MENU_VIEWMYPROFILE"]=null; $this->_addMenuItem( $mi, _UE_MENU_VIEWMYPROFILE,cbSef($ue_userprofile_url), "", "","", _UE_MENU_VIEWMYPROFILE_DESC,"" ); } } // ----- MESSAGES MENU ----- // Send PMS if ( $_CB_framework->myId() != $user->id && $_CB_framework->myId() > 0 ) { global $_CB_PMS; $resultArray = $_CB_PMS->getPMSlinks($user->id, $_CB_framework->myId(), "", "", 1); if (count($resultArray) > 0) { foreach ($resultArray as $res) { if (is_array($res)) { $mi = array(); $mi["_UE_MENU_MESSAGES"][$res["caption"]]=null; $this->_addMenuItem( $mi, getLangDefinition($res["caption"]),cbSef($res["url"]), "", "","", getLangDefinition($res["tooltip"]),"" ); } } } } // Send Email $emailHtml=getFieldValue('primaryemailaddress',$user->email,$user); if ($ueConfig['allow_email_display']!=4 && $_CB_framework->myId() != $user->id && $_CB_framework->myId() > 0) { switch ($ueConfig['allow_email_display']) { case 1: // Display Email only $caption = $emailHtml; $url = "javascript:void(0);"; $desc = _UE_MENU_USEREMAIL_DESC; break; case 2: // Display Email with link: $caption = null; $url = $emailHtml; $desc = _UE_MENU_SENDUSEREMAIL_DESC; break; case 3: // Display Email-to text with link to web-form: $caption = _UE_MENU_SENDUSEREMAIL; $url = $emailHtml; $desc = _UE_MENU_SENDUSEREMAIL_DESC; break; } $mi = array(); $mi["_UE_MENU_MESSAGES"]["_UE_MENU_SENDUSEREMAIL"]=null; $this->_addMenuItem( $mi, $caption, $url, "", "", "", $desc, "" ); } // ----- CONNECTIONS MENU ----- IF ($ueConfig['allowConnections'] && $_CB_framework->myId() > 0) { $ue_addConnection_url = $ue_base_url."&act=connections&task=addConnection&connectionid=".$user->id; $ue_removeConnection_url = $ue_base_url."&act=connections&task=removeConnection&connectionid=".$user->id; $ue_manageConnection_url = $ue_base_url."&task=manageConnections"; // Manage My Connections $mi = array(); $mi["_UE_MENU_CONNECTIONS"]["_UE_MENU_MANAGEMYCONNECTIONS"]=null; $this->_addMenuItem( $mi, _UE_MENU_MANAGEMYCONNECTIONS,cbSef($ue_manageConnection_url), "", "","", _UE_MENU_MANAGEMYCONNECTIONS_DESC,"" ); if ( $_CB_framework->myId() != $user->id ) { $_CB_database->setQuery("SELECT COUNT(*) FROM #__comprofiler_members WHERE referenceid=" . (int) $_CB_framework->myId() . " AND memberid=" . (int) $user->id); $isConnection = $_CB_database->loadResult(); if ($isConnection) { $_CB_database->setQuery("SELECT COUNT(*) FROM #__comprofiler_members WHERE referenceid=" . (int) $_CB_framework->myId() . " AND memberid=" . (int) $user->id." AND pending=0"); $isApproved = $_CB_database->loadResult(); $_CB_database->setQuery("SELECT COUNT(*) FROM #__comprofiler_members WHERE referenceid=" . (int) $_CB_framework->myId() . " AND memberid=" . (int) $user->id." AND accepted=1"); $isAccepted = $_CB_database->loadResult(); } if($isConnection==0) { $connectionurl=cbSef($ue_addConnection_url); if ( $ueConfig['useMutualConnections'] == 1 ) { $fmsg = "_UE_ADDCONNECTIONREQUEST"; $fmsgdesc = _UE_ADDCONNECTIONREQUEST_DESC; } else { $fmsg = "_UE_ADDCONNECTION"; $fmsgdesc = _UE_ADDCONNECTION_DESC; } if($ueConfig['conNotifyType']!=0) { $connectionurl="javascript:void(0)\" onclick=\"return overlib('" . str_replace(array("<",">"), array("<",">"), _UE_CONNECTIONINVITATIONMSG."<br /><form action="".$connectionurl ."" method="post" id="connOverForm" name="connOverForm">"._UE_MESSAGE ."<br /><textarea cols="40" rows="8" name="message"></textarea><br />" . "<input type="button" class="inputbox" onclick="cbConnSubmReq();" value="" ._UE_SENDCONNECTIONREQUEST."" /> " ."<input type="button" class="inputbox" onclick="cClick();" value="" ._UE_CANCELCONNECTIONREQUEST."" /></form>") ."', STICKY, CAPTION,'" .sprintf(_UE_CONNECTTO,htmlspecialchars(str_replace("'","'",getNameFormat($user->name,$user->username,$ueConfig['name_format'])),ENT_QUOTES)) ."', CENTER,CLOSECLICK,CLOSETEXT,'"._UE_CLOSE_OVERLIB."',WIDTH,350, ANCHOR,'cbAddConn',CENTERPOPUP,'LR','UR');"; // $flink="<a href=\"".$connectionurl."\" id=\"cbAddConn\" name=\"cbAddConn\" title=\"".$fmsgdesc."\">".getLangDefinition($fmsg)."</a>"; $flink = $connectionurl."\" name=\"cbAddConn"; //BBTRYREMOVED: "\" title=\"".$fmsgdesc."\">".getLangDefinition($fmsg)."</a>"; } else { $flink=$connectionurl; } } else { if ($isAccepted) { $connectionurl=cbSef($ue_removeConnection_url); if ($isApproved) { $fmsg = "_UE_REMOVECONNECTION"; $fmsgdesc=_UE_REMOVECONNECTION_DESC; } else { $fmsg = "_UE_REVOKECONNECTIONREQUEST"; $fmsgdesc=_UE_REVOKECONNECTIONREQUEST_DESC; } // $flink="<a href=\"".$connectionurl."\" onclick=\"return confirmSubmit();\" title=\"".$fmsgdesc."\">".getLangDefinition($fmsg)."</a>"; $flink = $connectionurl."\" onclick=\"return confirmSubmit();"; //BBTRYREMOVED: \" title=\"".$fmsgdesc."\">".getLangDefinition($fmsg)."</a>"; } else { /* $connectionurl=cbSef($ue_manageConnection_url); $fmsg = "_UE_MANAGECONNECTIONS"; //BB this is wrong here, unless non-accepted connections are also displayed there $fmsgdesc=_UE_MENU_MANAGEMYCONNECTIONS_DESC; $flink=$connectionurl; */ $fmsg = null; // manage connections is already above, no need to repeat here ! } } // Request/Add/Remove/Revoke Connection if ( $fmsg ) { $mi = array(); $mi["_UE_MENU_CONNECTIONS"][$fmsg]=null; $this->_addMenuItem( $mi, getLangDefinition($fmsg), $flink /*$connectionurl*/, "", "","", $fmsgdesc,"" ); } } } // ----- MODERATE MENU ----- if ( $_CB_framework->myId() == $user->id ) { // Request to unban: if($user->banned==1 && $this->cbUserIsModerator==0 && $ueConfig['allowUserBanning']==1) { $mi = array(); $mi["_UE_MENU_MODERATE"]["_UE_REQUESTUNBANPROFILE"]=null; $this->_addMenuItem( $mi, _UE_REQUESTUNBANPROFILE,cbSef($ue_unbanrequest_url), "", "","", _UE_MENU_REQUESTUNBANPROFILE_DESC,"" ); } } else { // Report User: if($ueConfig['allowUserReports']==1 && $this->cbUserIsModerator==0 && $_CB_framework->myId() > 0) { $mi = array(); $mi["_UE_MENU_MODERATE"]["_UE_REPORTUSER"]=null; $this->_addMenuItem( $mi, _UE_REPORTUSER,cbSef($ue_reportuser_url), "", "","", _UE_MENU_REPORTUSER_DESC,"" ); } // Approve/Reject Avatar & Ban/Unban profile & View User Reports: if($this->cbMyIsModerator==1 && $this->cbUserIsModerator==0) { $query = "SELECT COUNT(*) FROM #__comprofiler_userreports WHERE reportedstatus=0 AND reporteduser="******"SELECT COUNT(*) FROM #__comprofiler_userreports WHERE reporteduser="******"_UE_MENU_MODERATE"]["_UE_APPROVE_IMAGE"]=null; $this->_addMenuItem( $mi, _UE_APPROVE_IMAGE,cbSef($ue_approve_image_url), "", "","", _UE_MENU_APPROVE_IMAGE_DESC,"" ); } // Reject Image $mi = array(); $mi["_UE_MENU_MODERATE"]["_UE_REJECT_IMAGE"]=null; $this->_addMenuItem( $mi, _UE_REJECT_IMAGE,cbSef($ue_reject_image_url), "", "","", _UE_MENU_REJECT_IMAGE_DESC,"" ); } if($ueConfig['allowUserBanning']==1) { if($user->banned!=0 ) { // unban profile $mi = array(); $mi["_UE_MENU_MODERATE"]["_UE_UNBANPROFILE"]=null; $this->_addMenuItem( $mi, _UE_UNBANPROFILE,cbSef($ue_unban_url), "", "","", _UE_MENU_UNBANPROFILE_DESC,"" ); } else { // ban profile $mi = array(); $mi["_UE_MENU_MODERATE"]["_UE_BANPROFILE"]=null; $this->_addMenuItem( $mi, _UE_BANPROFILE,cbSef($ue_ban_url), "", "","", _UE_MENU_BANPROFILE_DESC,"" ); } if( $user->bannedby ) { // ban history $mi = array(); $mi["_UE_MENU_MODERATE"]["_UE_MENU_BANPROFILE_HISTORY"]=null; $this->_addMenuItem( $mi, _UE_MENU_BANPROFILE_HISTORY,cbSef($ue_banhistory_url), "", "","", _UE_MENU_BANPROFILE_HISTORY_DESC,"" ); } } if($ueConfig['allowUserReports']==1 && $userreports>0) { // view user reports $mi = array(); $mi["_UE_MENU_MODERATE"]["_UE_VIEWUSERREPORTS"]=null; $this->_addMenuItem( $mi, _UE_VIEWUSERREPORTS,cbSef($ue_viewuserreports_url), "", "","", _UE_MENU_VIEWUSERREPORTS_DESC,"" ); } elseif($ueConfig['allowUserReports']==1 && $userreportsAllTimes>0) { // view user reports $mi = array(); $mi["_UE_MENU_MODERATE"]["_UE_VIEWUSERREPORTS"]=null; $this->_addMenuItem( $mi, _UE_MOD_MENU_VIEWOLDUSERREPORTS,cbSef($ue_viewOlduserreports_url), "", "","", _UE_MOD_MENU_VIEWOLDUSERREPORTS_DESC,"" ); } } } // Test example: /* $mi = array(); $mi["_UE_MENU_CONNECTIONS"]["duplique"]=null; $this->addMenu( array( "position" => "menuBar" , // "menuBar", "menuList" "arrayPos" => $mi , "caption" => _UE_MENU_MANAGEMYCONNECTIONS , "url" => cbSef($ue_manageConnection_url) , // can also be "<a ....>" or "javascript:void(0)" or "" "target" => "" , // e.g. "_blank" "img" => null , // e.g. "<img src='plugins/user/myplugin/images/icon.gif' width='16' height='16' alt='' />" "alt" => null , // e.g. "text" "tooltip" => _UE_MENU_MANAGEMYCONNECTIONS_DESC , "keystroke" => null ) ); // e.g. "P" */ }
$records_eventreports['order'] = array_unique($records_eventreports['order']); } if (count($records_eventreports['records']) > 0) { foreach ($records_eventreports['order'] as $repID) { //getFieldValue($records_eventreports, $repID, DT_ORIGINAL_RECORD_ID) //find DA Report name $da_report = ''; $da_repID = getFieldValue($records_eventreports, $repID, DT_REPORT_DALINK); if ($da_repID > 0) { $da_report = recordSearch_2('ids:' . $da_repID); $da_report = getFieldValue($da_report, 0, DT_NAME); } ?> <li> (#<?php echo $repID . ') <em>' . getFieldValue($records_eventreports, $repID, 'rec_Title') . '</em>. [' . getFieldValue($records_eventreports, $repID, DT_DATE) . ']. ' . getTermById(getFieldValue($records_eventreports, $repID, DT_REPORT_SOURCE_TYPE)) . ' ' . $da_report . ' ' . getFieldValue($records_eventreports, $repID, DT_REPORT_CITATION); ?> </li> <?php } } else { echo '<li>None recorded</li>'; } ?> </ul> </p> </div> </body></html>
$sql = "update " . $DBPrefix . "logs set cateId='" . $_POST['move_category'] . "' where {$stritem}"; $DMC->query($sql); update_cateCount($_POST['move_category'], "adding", count($itemlist)); } //更新Cache categories_recache(); recentLogs_recache(); logsTitle_recache(); logs_sidebar_recache($arrSideModule); } //自动截取 if ($_POST['operation'] == "addautoSplit" and $stritem != "") { $autoSplit = $_POST['addautoSplit']; for ($i = 0; $i < count($itemlist); $i++) { $mark_id = $itemlist[$i]; $logContent = getFieldValue($DBPrefix . "logs", " id='{$mark_id}'", "logContent"); //如果日志包含了特殊标签,则不自载截取 if (strpos(";" . $logContent, "<!--more-->") > 0) { $autoSplit = 0; } if (strpos(";" . $logContent, "<!--nextpage-->") > 0) { $autoSplit = 0; } if (strpos(";" . $logContent, "<!--hideBegin-->") > 0) { $autoSplit = 0; } if (strpos(";" . $logContent, "<!--galleryBegin-->") > 0) { $autoSplit = 0; } //if (strpos(";".$logContent,"<!--fileBegin-->")>0) $autoSplit=0; //if (strpos(";".$logContent,"<!--mfileBegin-->")>0) $autoSplit=0;
$tsize = explode('x', strtolower($settingInfo['thumbSize'])); if ($fileWidth > $tsize[0] || $fileHeight > $tsize[1]) { $attach_thumb = array('filepath' => "../attachments/" . $value, 'filename' => $attachment, 'extension' => $fileType, 'thumbswidth' => $tsize[0], 'thumbsheight' => $tsize[1]); $thumb_data = generate_thumbnail($attach_thumb); $fileWidth = $thumb_data['thumbwidth']; $fileHeight = $thumb_data['thumbheight']; $thumbfile = $thumb_data['thumbfilepath']; $value = str_replace("../attachments/", "", $thumbfile); } } } else { $thumbfile = ""; } //写进数据库 $fileName = $attdesc == "" ? $fileName : encode($attdesc) . "." . $fileType; $rsexits = getFieldValue($DBPrefix . "attachments", "attTitle='" . $fileName . "' and fileType='" . $updateStyle . "' and fileSize='" . $fileSize . "' and logId='0'", "name"); if ($rsexits == "") { $sql = "INSERT INTO " . $DBPrefix . "attachments(name,attTitle,fileType,fileSize,fileWidth,fileHeight,postTime,logId) VALUES ('{$value}','{$fileName}','{$updateStyle}','{$fileSize}','{$fileWidth}','{$fileHeight}','" . time() . "',0)"; $DMC->query($sql); } else { print_message($strDataExists); } do_filter("f2_attach", $basefile); if (!empty($thumbfile)) { do_filter("f2_attach", $thumbfile); //縮略圖 } settings_recount("attachments"); settings_recache(); $action = ""; }
} if ($check_info == 1) { if ($mark_id != "") { //编辑 $rsexits = getFieldValue($DBPrefix . "filters", "name='" . encode($_POST['name']) . "' and category='" . $_POST['category'] . "'", "id"); if ($rsexits != $mark_id && $rsexits != "") { $ActionMessage = "{$strDataExists}"; $action = "edit"; } else { $sql = "update " . $DBPrefix . "filters set name='" . encode($_POST['name']) . "',category='" . $_POST['category'] . "' where id='{$mark_id}'"; $DMC->query($sql); $action = ""; } } else { //新增 $rsexits = getFieldValue($DBPrefix . "filters", "name='" . encode($_POST['name']) . "' and category='" . $_POST['category'] . "'", "id"); if ($rsexits != "") { $ActionMessage = "{$strDataExists}"; $action = "add"; } else { $sql = "INSERT INTO " . $DBPrefix . "filters(name,category) VALUES ('" . encode($_POST['name']) . "','" . $_POST['category'] . "')"; $DMC->query($sql); $action = ""; } } if ($action == "") { filters_recache(); } } } //其它操作行为:编辑、删除等
echo 'END$$<br/>DELIMITER ;'; echo '<br/><br/>'; /* Update Proc */ $tab = '  '; echo 'USE `' . Config::$database . '`;<br/>'; echo 'DROP procedure IF EXISTS `update' . $class->getName() . '`;<br/><br/>'; echo 'DELIMITER $$<br/>'; echo 'USE `' . Config::$database . '`$$<br/><br/>'; echo 'CREATE PROCEDURE update' . $class->getName() . '(_id int'; $fieldarray = $class->getFields(); $separator = ", "; foreach ($fieldarray as $field) { if ($field[1] != "linkedentities" && $field[1] != "childentities") { echo $separator . $field[0] . ' '; } echo getFieldValue($field); } echo ", _tenantid int"; if ($class->hasOwner()) { echo ', _userid int'; } echo ")<br/>"; echo 'BEGIN<br/>'; echo '<br/>'; echo $tab . 'UPDATE ' . lcfirst($class->getName()) . ' SET<br/>'; $separator = $tab . $tab; foreach ($fieldarray as $field) { if ($field[1] != "linkedentities" && $field[1] != "childentities") { echo $separator . $field[0] . ' = ' . $field[0]; $separator = ',<br/>' . $tab . $tab; }
?> </td> </tr> <tr> <td align="left"><img src="images/line2.gif"></td> </tr> <tr> <td align="left" height="5"></td> </tr> <?php $j = 1; foreach ($headHunters as $rec_id => $shortlist_count) { if ($j > 4) { break; } $logo = getFieldValue("job_recruiter", "comp_logo", "rec_id", $rec_id); $img_exist = 0; $directory = "recruiter/logos/"; $handle = opendir($directory); while (FALSE !== ($item = readdir($handle))) { if ($item == $logo) { $img_exist = 1; } } if ($img_exist == 1) { ?> <tr> <td align="left" height="82"><img src="recruiter/logos/<?php echo $logo; ?> " ></td>
$ActionMessage = call_user_func($plugin . "_unstall"); if ($ActionMessage == "") { $ActionMessage = "{$strf2Plugins} <b>{$plugin}</b> {$strUnActive}{$strSuccess}!"; modules_recache(); modulesSetting_recache(); } else { $ActionMessage = "{$strf2Plugins} <b>{$plugin}: </b>" . $ActionMessage; } } $action = ""; } if ($action == "setSave") { $plugin = basename($_GET['plugin']); $title = "{$strf2Plugins} <b>{$plugin}</b> {$strPluginSetting}"; include_once F2BLOG_ROOT . "plugins/{$plugin}/setting.php"; $modId = getFieldValue($DBPrefix . "modules", "name='{$plugin}'", "id"); $ActionMessage = call_user_func_array($plugin . "_setSave", array($_POST, $modId)); if ($ActionMessage == "") { $ActionMessage = "{$strf2Plugins} <b>{$plugin}</b> {$strPluginSetting}{$strSuccess}!"; modulesSetting_recache(); } else { $ActionMessage = "{$strf2Plugins} <b>{$plugin}: </b>" . $ActionMessage; } //Redirect setting $action = "set"; } if ($action == "set") { $plugin = basename($_GET['plugin']); $title = "{$strf2Plugins} {$plugin} {$strPluginSetting}"; $arr = getModSet($plugin); include_once "../plugins/{$plugin}/setting.php";
function addCategory($name) { global $DMC, $DBPrefix; $orderno = getFieldValue($DBPrefix . "categories", "parent='0' order by orderNo desc", "orderNo"); if ($orderno < 1) { $orderno = 1; } else { $orderno++; } $sql = "INSERT INTO {$DBPrefix}categories(parent,name,orderNo,isHidden,cateIcons) VALUES ('0','{$name}','{$orderno}','0','1')"; $DMC->query($sql); return $DMC->insertId(); }
$seektype = ""; } $seek_url = "{$PHP_SELF}?order={$order}"; //查找用链接 $edit_url = "{$PHP_SELF}?basedir=" . urlencode($basedir) . "&seekname={$seekname}&seektype={$seektype}"; //编辑或新增链接 if ($action == "add") { //新增。 $title = "{$strAttachmentsTitleAdd}"; include "attachments_add.inc.php"; } else { if ($action == "edit" && $_GET['file_id'] != "") { //修改文件名。 $title = "{$strAttachmentsTitleEdit}"; $file_id = $_GET['file_id']; $file_title = getFieldValue($DBPrefix . "attachments", "where name like '%" . $file_id . "'", "attTitle"); if ($file_title != "") { $file_title = substr($file_title, 0, strrpos($file_title, ".")); } include "attachments_edit.inc.php"; } else { //查找和浏览 $title = "{$strAttachmentsTitle}"; $handle = opendir("{$basedir}"); while ($file = readdir($handle)) { if (is_file($basedir . $file)) { $filetype = getFileType($file); if ($seektype != "") { if (strpos(";{$seektype}", $filetype) > 0) { $filelist[] = $file; }
} $orderSQL = ",orderNo='{$orderno}'"; } $sql = "update " . $DBPrefix . "modules set name='{$name}',modTitle=\"{$modTitle}\",disType='{$disType}',isHidden='{$isHidden}',indexOnly='{$indexOnly}',htmlCode=\"{$htmlCode}\",pluginPath='{$pluginPath}',isInstall='{$isInstall}'{$orderSQL} where id='{$mark_id}'"; $DMC->query($sql); $ActionMessage = $strSaveSuccess; $action = ""; } } else { //新增 $rsexits = getFieldValue($DBPrefix . "modules", "name='{$name}' and disType='{$disType}'", "id"); if ($rsexits != "") { $ActionMessage = "{$strDataExists}"; $action = "add"; } else { $orderno = getFieldValue($DBPrefix . "modules", "disType='{$disType}' order by orderNo desc", "orderNo"); if ($orderno < 1) { $orderno = 1; } else { $orderno++; } $sql = "INSERT INTO " . $DBPrefix . "modules(name,modTitle,disType,isHidden,indexOnly,orderNo,htmlCode,pluginPath,isInstall) VALUES ('{$name}',\"{$modTitle}\",'{$disType}','{$isHidden}','{$indexOnly}','{$orderno}',\"{$htmlCode}\",'{$pluginPath}','{$isInstall}')"; $DMC->query($sql); $ActionMessage = $strSaveSuccess; $action = ""; } } if ($action == "") { modules_recache(); } } else {
//检测验证码 if (!empty($_POST['validate'])) { $_POST['validate'] = safe_convert($_POST['validate']); } if ($check_info == 1 && (empty($_POST['validate']) || $_POST['validate'] != $_SESSION['backValidate']) && $settingInfo['isValidateCode'] == 1) { $ActionMessage = $strGuestBookValidError; $check_info = 0; } else { $_SESSION['backValidate'] = ""; //把验证码清除 } if ($check_info == 1) { $blogName = safe_convert(strip_tags($_POST['blogName'])); $blogUrl = safe_convert(strip_tags($_POST['blogUrl'])); $blogLogo = safe_convert(strip_tags($_POST['blogLogo'])); $rsexits = getFieldValue($DBPrefix . "links", "name='{$blogName}' or blogUrl='{$blogUrl}'", "id"); if ($rsexits != "") { $ActionMessage = $strDataExists; } else { $sql = "INSERT INTO " . $DBPrefix . "links(name,blogUrl,blogLogo) VALUES ('{$blogName}','{$blogUrl}','{$blogLogo}')"; $DMC->query($sql); $ActionMessage = "{$strApplyWaitApprove}"; $blogName = $blogUrl = $blogLogo = ""; } } } if (preg_match("/http:\\/\\//is", $settingInfo['linklogo'])) { $logopath = $settingInfo['linklogo']; } else { $logopath = $settingInfo['blogUrl'] . $settingInfo['linklogo']; }
</td> </tr> <?php } ?> <tr> <td>Country</td> <td align="left"><?php echo getFieldValue("job_country", "country_name", "country_id", $rsRec->rec_country); ?> </td> </tr> <tr> <td>Province/State</td> <td align="left"><?php echo getFieldValue("job_state", "state_name", "state_id", $rsRec->rec_state); ?> </td> </tr> </table></td> </tr> <tr> <td height="10"></td> </tr> <tr> <td class="subhead_gray_small" >Contact Information</td> </tr> <tr> <td><img src="../images/line.gif" width="772"></td> </tr> <tr>
$DMC->query($sql); } //添加到某组 if ($_POST['operation'] == "move" and $stritem != "") { $orderno = getFieldValue($DBPrefix . "links", " lnkGrpId='" . $_POST['move_group'] . "' order by orderNo desc", "orderNo"); if ($orderno < 1) { $orderno = 1; } else { $orderno++; } $sql = "update " . $DBPrefix . "links set lnkGrpId='" . $_POST['move_group'] . "',isApp='1',isSidebar='1',orderno='{$orderno}' where {$stritem}"; $DMC->query($sql); } //添加到某组并为文本链接 if ($_POST['operation'] == "movetext" and $stritem != "") { $orderno = getFieldValue($DBPrefix . "links", " lnkGrpId='" . $_POST['move_group2'] . "' order by orderNo desc", "orderNo"); if ($orderno < 1) { $orderno = 1; } else { $orderno++; } $sql = "update " . $DBPrefix . "links set lnkGrpId='" . $_POST['move_group2'] . "',isApp='1',blogLogo='',isSidebar='1',orderno='{$orderno}' where {$stritem}"; $DMC->query($sql); } if ($_POST['operation'] == "move" || $_POST['operation'] == "movetext") { do_action("f2_link"); links_recache(); logs_sidebar_recache($arrSideModule); } } $page_url = "{$PHP_SELF}?seekname={$seekname}&order={$order}";
function sendMailseekerrate($seekerid, $recid) { $objDb = new db(); $sqlJob = "select seeker_name,seeker_surname,seeker_email from job_jobseeker where seeker_id='" . $seekerid . "'"; $resultJob = $objDb->ExecuteQuery($sqlJob); $rsJob = mysql_fetch_object($resultJob); //print_r($rsJob); $sqlComp = "select rec_email,rec_name,comp_name from job_recruiter where rec_id='" . $recid . "'"; $resultComp = $objDb->ExecuteQuery($sqlComp); $rsComp = mysql_fetch_object($resultComp); //print_r($row); $adminemail = getFieldValue('job_user', 'user_email', 'user_id', 1); $str = '<style type="text/css" type="text/css"> .sectionheading { font-family: Arial, Helvetica, sans-serif; font-size:20px; font-weight:normal; color: #329900; text-decoration: none; } .table_alternate_row_noboder { font-family:Arial, Helvetica, sans-serif; font-size:12px; background-color:#E6E6E6; color: #333333; text-decoration:none; } .subhead_gray_small { font-family: Arial, Helvetica, sans-serif; font-size:13px; font-weight:bold; color: #333333; text-decoration:none; } .normal { font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-style:normal; color: #000000; text-decoration:none; } </style> <table width="100%" cellpadding="6" cellspacing="0" class="normal"> <tr> <td colspan="3"><a href="#Logo"><img alt="Image Not Found" src="images/logonew.png""></a></td> </tr> <tr> <td class="sectionheading" colspan="3"> ' . $rsComp->comp_name . ' Company has Rated on your Resume</td> </tr> <tr> <td> Company Name: <span class="subhead_gray_small">' . $rsComp->comp_name . '</span><br> </td> <td> Recruiters Name: <span class="subhead_gray_small">' . $rsComp->rec_name . '</span><br> </td> <td> View Date: <span class="subhead_gray_small">' . date('d-m-Y') . '</span><br> </td> </tr> <tr> <td colspan="3" class="sectionheading"> </td> </tr>'; $str .= '</table>'; $from = "NamRecruit <*****@*****.**>"; $subject = "Dear" . $rsJob->seeker_name . "a new company rated on your resume"; $headers = "From: {$from}\nContent-Type: text/html; charset=iso-8859-1"; @mail(trim($from), $subject, $str, $headers); }
echo getFieldValue($arrSalary, 'income_tax'); ?> "/> </div> <div class="form-group"> <label for="net_salary"> Net Salary</label> <input type="text" name="net_salary" class="form-control" id="net_salary" readonly value="<?php echo getFieldValue($arrSalary, 'net_salary'); ?> "/> </div> <div class="form-group"> <label for="grade">Grade</label> <input type="text" name="grade" class="form-control" id="grade" value="<?php echo getFieldValue($arrSalary, 'grade'); ?> "/> </div> <div class="form-group"> <input type="submit" class="btn btn-success btn-lg" value="<?php getButtonText($type, 'salary'); ?> "/> <a href="/salaries" class="btn btn-danger btn-lg"> Cancel </a> </div> </form> </div> </div>
if ($rsexits != $mark_id && $rsexits != "") { $ActionMessage = "{$strDataExists}"; $action = "edit"; } else { $sql = "update " . $DBPrefix . "links set name='" . encode($lnkName) . "',blogUrl='" . encode($lnkUrl) . "',blogLogo='" . encode($lnkLogo) . "',isSidebar='{$isSidebar}',lnkGrpId='{$lnkGrpId}',isApp='1' where id='{$mark_id}'"; $DMC->query($sql); $action = ""; } } else { //新增 $rsexits = getFieldValue($DBPrefix . "links", "name='" . encode($lnkName) . "' and blogUrl='" . encode($lnkUrl) . "'", "id"); if ($rsexits != "") { $ActionMessage = "{$strDataExists}"; $action = "add"; } else { $orderno = getFieldValue($DBPrefix . "links", " order by orderNo desc", "orderNo"); if ($orderno < 1) { $orderno = 1; } else { $orderno++; } $sql = "INSERT INTO " . $DBPrefix . "links(name,blogUrl,orderNo,blogLogo,isSidebar,lnkGrpId,isApp) VALUES ('" . encode($lnkName) . "','" . encode($lnkUrl) . "','{$orderno}','" . encode($lnkLogo) . "','{$isSidebar}','{$lnkGrpId}','1')"; $DMC->query($sql); $action = ""; } } if ($action == "") { do_action("f2_link"); links_recache(); logs_sidebar_recache($arrSideModule); }
/** * Generates the HTML to display the user profile tab * @param moscomprofilerTab $tab the tab database entry * @param moscomprofilerUser $user the user being displayed * @param int $ui 1 for front-end, 2 for back-end * @return mixed either string HTML for tab content, or false if ErrorMSG generated */ function getDisplayTab($tab, $user, $ui) { global $_CB_framework, $_CB_database, $ueConfig; $return = null; if (!$ueConfig['allowConnections'] || isset($ueConfig['connectionDisplay']) && $ueConfig['connectionDisplay'] == 1 && $_CB_framework->myId() != $user->id) { return null; } $params = $this->params; $con_ShowTitle = $params->get('con_ShowTitle', '1'); $con_ShowSummary = $params->get('con_ShowSummary', '0'); $con_SummaryEntries = $params->get('con_SummaryEntries', '4'); $con_pagingenabled = $params->get('con_PagingEnabled', '1'); $con_entriesperpage = $params->get('con_EntriesPerPage', '10'); $pagingParams = $this->_getPaging(array(), array("connshow_")); $showall = $this->_getReqParam("showall", false); if ($con_ShowSummary && !$showall && $pagingParams["connshow_limitstart"] === null) { $summaryMode = true; $showpaging = false; $con_entriesperpage = $con_SummaryEntries; } else { $summaryMode = false; $showpaging = $con_pagingenabled; } $isVisitor = null; if ($_CB_framework->myId() != $user->id) { $isVisitor = "\n AND m.pending=0 AND m.accepted=1"; } if ($showpaging || $summaryMode) { //select a count of all applicable entries for pagination if ($isVisitor) { $contotal = $this->_getUserNumberOfConnections($user); } else { $query = "SELECT COUNT(*)" . "\n FROM #__comprofiler_members AS m" . "\n LEFT JOIN #__comprofiler AS c ON m.memberid=c.id" . "\n LEFT JOIN #__users AS u ON m.memberid=u.id" . "\n WHERE m.referenceid=" . (int) $user->id . "\n AND c.approved=1 AND c.confirmed=1 AND c.banned=0 AND u.block=0" . $isVisitor . "\n "; $_CB_database->setQuery($query); $contotal = $_CB_database->loadResult(); if (!is_numeric($contotal)) { $contotal = 0; } } } if (!$showpaging || $pagingParams["connshow_limitstart"] === null || $con_entriesperpage > $contotal) { $pagingParams["connshow_limitstart"] = "0"; } $query = "SELECT m.*,u.name,u.email,u.username,c.avatar,c.avatarapproved, u.id " . "\n FROM #__comprofiler_members AS m" . "\n LEFT JOIN #__comprofiler AS c ON m.memberid=c.id" . "\n LEFT JOIN #__users AS u ON m.memberid=u.id" . "\n WHERE m.referenceid=" . (int) $user->id . "" . "\n AND c.approved=1 AND c.confirmed=1 AND c.banned=0 AND u.block=0" . $isVisitor . "\n ORDER BY m.membersince DESC, m.memberid ASC"; $_CB_database->setQuery($query, (int) ($pagingParams["connshow_limitstart"] ? $pagingParams["connshow_limitstart"] : 0), (int) $con_entriesperpage); $connections = $_CB_database->loadObjectList(); if (!count($connections) > 0) { $return .= _UE_NOCONNECTIONS; return $return; } if ($con_ShowTitle) { if ($_CB_framework->myId() == $user->id) { $return .= "<h3 class=\"cbConTitle\">" . _UE_YOURCONNECTIONS . "</h3>"; } else { $return .= "<h3 class=\"cbConTitle\">" . sprintf(_UE_USERSNCONNECTIONS, getNameFormat($user->name, $user->username, $ueConfig['name_format'])) . "</h3>"; } } $return .= $this->_writeTabDescription($tab, $user); $live_site = $_CB_framework->getCfg('live_site'); $boxHeight = $ueConfig['thumbHeight'] + 46; $boxWidth = $ueConfig['thumbWidth'] + 28; foreach ($connections as $connection) { $conAvatar = getFieldValue('image', $connection->avatar, $connection); $emailIMG = getFieldValue('primaryemailaddress', $connection->email, $connection, null, 1); $pmIMG = getFieldValue('pm', $connection->username, $connection, null, 1); $onlineIMG = $ueConfig['allow_onlinestatus'] == 1 ? getFieldValue('status', null, $connection, null, 1) : ""; if ($connection->accepted == 1 && $connection->pending == 1) { $actionIMG = '<img src="' . $live_site . '/components/com_comprofiler/images/pending.png" border="0" alt="' . _UE_CONNECTIONPENDING . "\" title=\"" . _UE_CONNECTIONPENDING . "\" /> <a href=\"" . cbSef("index.php?option=com_comprofiler&act=connections&task=removeConnection&connectionid=" . $connection->memberid) . "\" onclick=\"return confirmSubmit();\" ><img src=\"" . $live_site . "/components/com_comprofiler/images/publish_x.png\" border=\"0\" alt=\"" . _UE_REMOVECONNECTION . "\" title=\"" . _UE_REMOVECONNECTION . "\" /></a>"; } elseif ($connection->accepted == 1 && $connection->pending == 0) { $actionIMG = "<a href=\"" . cbSef("index.php?option=com_comprofiler&act=connections&task=removeConnection&connectionid=" . $connection->memberid) . "\" onclick=\"return confirmSubmit();\" ><img src=\"" . $live_site . "/components/com_comprofiler/images/publish_x.png\" border=\"0\" alt=\"" . _UE_REMOVECONNECTION . "\" title=\"" . _UE_REMOVECONNECTION . "\" /></a>"; } elseif ($connection->accepted == 0) { $actionIMG = "<a href=\"" . cbSef("index.php?option=com_comprofiler&act=connections&task=acceptConnection&connectionid=" . $connection->memberid) . '"><img src="' . $live_site . "/components/com_comprofiler/images/tick.png\" border=\"0\" alt=\"" . _UE_ACCEPTCONNECTION . "\" title=\"" . _UE_ACCEPTCONNECTION . "\" /></a> <a href=\"" . cbSef("index.php?option=com_comprofiler&act=connections&task=removeConnection&connectionid=" . $connection->memberid) . '"><img src="' . $live_site . "/components/com_comprofiler/images/publish_x.png\" border=\"0\" alt=\"" . _UE_REMOVECONNECTION . "\" title=\"" . _UE_DECLINECONNECTION . "\" /></a>"; } $tipField = "<b>" . _UE_CONNECTEDSINCE . "</b> : " . dateConverter($connection->membersince, 'Y-m-d', $ueConfig['date_format']); if (getLangDefinition($connection->type) != null) { $tipField .= "<br /><b>" . _UE_CONNECTIONTYPE . "</b> : " . getConnectionTypes($connection->type); } if ($connection->description != null) { $tipField .= "<br /><b>" . _UE_CONNECTEDCOMMENT . "</b> : " . htmlspecialchars($connection->description); } $tipTitle = _UE_CONNECTEDDETAIL; $htmltext = $conAvatar; $style = "style=\"padding:5px;\""; $tooltipAvatar = cbFieldTip($ui, $tipField, $tipTitle, '250', '', $htmltext, '', $style, '', false); if ($_CB_framework->myId() == $user->id) { $return .= "<div class=\"connectionBox\" style=\"position:relative;height:" . ($boxHeight + 24) . "px;width:" . $boxWidth . "px;\">" . "<div style=\"position:absolute; top:3px; width:auto;left:5px;right:5px;\">" . $actionIMG . '</div>' . "<div style=\"position:absolute; top:18px; width:auto;left:5px;right:5px;\">" . $tooltipAvatar . '</div>' . "<div style=\"position:absolute; bottom:0px; width:auto;left:5px;right:5px;\">" . $onlineIMG . " " . getNameFormat($connection->name, $connection->username, $ueConfig['name_format']) . "<br /><a href=\"" . cbSef("index.php?option=com_comprofiler&task=userProfile&user="******"><img src="' . $live_site . "/components/com_comprofiler/images/profiles.gif\" border=\"0\" alt=\"" . _UE_VIEWPROFILE . "\" title=\"" . _UE_VIEWPROFILE . "\" /></a> " . $emailIMG . " " . $pmIMG . "\n"; } else { $return .= "<div class=\"connectionBox\" style=\"position:relative;height:" . $boxHeight . "px;width:" . $boxWidth . "px;\">" . "<div style=\"position:absolute; top:10px; width:auto;left:5px;right:5px;\">" . $tooltipAvatar . '</div>' . "<div style=\"position:absolute; bottom:0px; width:auto;left:5px;right:5px;\">" . $onlineIMG . " " . getNameFormat($connection->name, $connection->username, $ueConfig['name_format']) . "\n"; } $return .= "</div></div>\n"; } $return .= "<div style=\"clear:both;\"> </div>"; // Add paging control at end of list if paging enabled if ($showpaging && $con_entriesperpage < $contotal) { $return .= "<div style='width:95%;text-align:center;'>" . $this->_writePaging($pagingParams, "connshow_", $con_entriesperpage, $contotal) . "</div>"; } if ($con_ShowSummary && $_CB_framework->myId() == $user->id || $summaryMode && $con_entriesperpage < $contotal) { $return .= "<div class=\"connSummaryFooter\" style=\"width:100%;clear:both;\">"; if ($_CB_framework->myId() == $user->id) { // Manage connections link: $return .= "<div id=\"connSummaryFooterManage\" style=\"float:left;\">" . "<a href=\"" . cbSef('index.php?option=com_comprofiler&task=manageConnections') . "\" >[" . _UE_MANAGECONNECTIONS . "]</a>" . "</div>"; } if ($summaryMode && $con_entriesperpage < $contotal) { // See all of user's ## connections $return .= "<div id=\"connSummaryFooterSeeConnections\" style=\"float:right;\">" . "<a href=\"" . $this->_getAbsURLwithParam(array("showall" => "1")) . "\">"; if ($_CB_framework->myId() == $user->id) { $return .= sprintf(_UE_SEEALLNCONNECTIONS, $contotal); } else { $return .= sprintf(_UE_SEEALLOFUSERSNCONNECTIONS, getNameFormat($user->name, $user->username, $ueConfig['name_format']), "<strong>" . $contotal . "</strong>"); } $return .= "</a>" . "</div>"; } $return .= " </div>" . "<div style=\"clear:both;\"> </div>"; } return $return; }
/** * Generates HTML for favorites in forum tab * * @param object $template * @param object $forum * @param object $model * @return mixed */ function ShowFavorites( $template, $forum, $model ) { $html = null; $oneOrTwo = 1; if ( $template->favorites ) { $html .= '<br /><table width="100%" cellspacing="0" cellpadding="3" border="0">' . '<thead>' . '<tr class="sectiontableheader">' . '<th colspan="4">' . CBTxt::T( 'Your Favorites' ) . '</th>' . '</tr>' . '<tr class="sectiontableheader">' . '<th width="20%">' . $template->titles->date . '</th>' . '<th width="45%">' . $template->titles->subject . '</th>' . '<th width="25%">' . $template->titles->category . '</th>' . '<th width="10%">' . CBTxt::T( 'Action' ) . '</th>' . '</tr>' . '</thead>' . '<tbody>'; foreach ( $template->favorites as $item ) { $unsubURL = cbSef( $template->unFavThreadURL . $item->thread ); $postURL = cbSef( 'index.php?option=' . $forum->component . $forum->itemid . '&func=view&catid='. $item->catid . '&id=' . $item->id ); $catURL = cbSef( 'index.php?option=' . $forum->component . $forum->itemid . '&func=' . ( $forum->component == 'com_kunena' ? 'showcat' : 'view' ) . '&catid='. $item->catid ); $html .= '<tr class="sectiontableentry' . $oneOrTwo . '">' . '<td>' . getFieldValue( 'date', date( 'Y-m-d, H:i:s', $item->time ) ) . '</td>' . '<td><a href="' . $postURL . '">' . htmlspecialchars( stripslashes( $item->subject ) ) . '</a></td>' . '<td><a href="' . $catURL . '">' . htmlspecialchars( stripslashes( $item->catname ) ) . '</a></td>' . '<td><a href="javascript:void(0);" onclick="javascript:if ( confirm(\'' . CBTxt::T( "Are you sure you want to remove this favorite thread?" ) . '\') ) { location.href=\'' . $unsubURL . '\'; }">' . CBTxt::T( 'Remove' ) . '</a></td>' . '</tr>'; $oneOrTwo = ( $oneOrTwo == 1 ? 2 : 1 ); } $html .= '</tbody>' . '</table>'; if ( $template->showPaging ) { $html .= '<br /><div style="width:95%;text-align:center;">' . $template->paging . '</div>'; } $html .= '<br /><div style="width:95%;text-align:center;"><input type="button" class="button" onclick="javascript:if ( confirm(\'' . CBTxt::T( "Are you sure you want to remove all your favorite threads?" ) . '\') ) { location.href=\'' . $template->unFavAllURL . '\'; }" value="' . CBTxt::T( 'Remove All' ) . '" /></div>'; } else { $html .= '<br /><div>' . CBTxt::T( 'No favorites found for you.' ) . '</div>'; } return $html; }
echo getFieldValue($item, 'ville'); ?> " size="20" placeholder="Ville" /> </td> </tr> <tr> <td width="200"><label for="telephone">Telephone:</label></td> <td><input name="telephone" id="telephone" type="text" value="<?php echo getFieldValue($item, 'telephone'); ?> " size="20" /></td> </tr> <tr> <td width="200"><label for="gsm"><span class="required">*</span>GSM:</label></td> <td><input name="gsm" id="gsm" type="text" class="required" value="<?php echo getFieldValue($item, 'gsm'); ?> " size="20" /></td> </tr> </table> <div class="buttons2"> <br /> <?php if ($_GET['action'] == 'add') { ?> <button name="add" value="Ajouter" type="submit" class="positive" id="Modifier"> <img src="images/apply2.png" alt=""/> Ajouter </button> <?php } elseif ($_GET['action'] == 'edit') {
if (strpos(";" . $logContent, "[musicBegin]") > 0) { $logContent = preg_replace("/\\[musicBegin\\](.+?)\\[musicEnd\\]/is", "<!--musicBegin-->\\1<!--musicEnd-->", $logContent); } if (strpos(";" . $logContent, "[mfileBegin]") > 0) { $logContent = preg_replace("/\\[mfileBegin\\](.+?)\\[mfileEnd\\]/is", "<!--mfileBegin-->\\1<!--mfileEnd-->", $logContent); } if (strpos(";" . $logContent, "[galleryBegin]") > 0) { $logContent = preg_replace("/\\[galleryBegin\\](.+?)\\[galleryEnd\\]/is", "<!--galleryBegin-->\\1<!--galleryEnd-->", $logContent); } if (strpos($logContent, "[more]") > 0) { $logContent = str_replace("[more]", "<!--more-->", $logContent); } if (strpos($logContent, "[nextpage]") > 0) { $logContent = str_replace("[nextpage]", "<!--nextpage-->", $logContent); } $rsexits = getFieldValue($DBPrefix . "logs", "saveType='2'", "id"); if ($rsexits != "") { $edit_sql = $pubTimeType == "now" ? "" : ",postTime='{$postTime}'"; $sql = "update " . $DBPrefix . "logs set cateId='{$cateId}',logTitle='{$logTitle}',logContent='{$logContent}',author='{$author}',isComment='{$isComment}',isTrackback='{$isTrackback}',isTop='{$isTop}',weather='{$weather}',saveType='2',tags='{$tags}',logsediter='{$logsediter}',password='******'{$edit_sql} where id='{$rsexits}'"; $DMC->query($sql); $last_id = $rsexits; } else { $sql = "INSERT INTO " . $DBPrefix . "logs(cateId,logTitle,logContent,author,quoteUrl,postTime,isComment,isTrackback,isTop,weather,saveType,tags,password,logsediter) VALUES ('{$cateId}','{$logTitle}','{$logContent}','{$author}','{$quoteUrl}','{$postTime}','{$isComment}','{$isTrackback}','{$isTop}','{$weather}','2','{$tags}','{$addpassword}','{$logsediter}')"; $DMC->query($sql); $last_id = $DMC->insertId(); } header("location: ../index.php?load=read&id={$last_id}"); exit; } else { header("Content-Type: text/html; charset=utf-8"); echo $ActionMessage;
$cntShortlisted = 0; $remainingShortlist = 0; $positions = 0; $postExpired = 0; global $objDb; $sqlSites = "select * from job_top_sites where status=1 limit 0,4"; $resultSites = $objDb->ExecuteQuery($sqlSites); $title_class = array("top_brown", "top_blue", "top_violet", "top_green"); $img = array("brown.gif", "blue.gif", "violet.gif", "green.gif"); $sql_prod = "SELECT * FROM job_banner WHERE banner_status=1 ORDER BY banner_id ASC"; $res_prod = $objDb->ExecuteQuery($sql_prod); $numrs = mysql_num_rows($res_prod); $rec_id = $_SESSION["ses_rec_id"]; $expired = 1; $activated_before = 0; $reg_type1 = getFieldValue("job_recruiter", "comp_type", "rec_id", $_SESSION["ses_rec_id"]); $plan_name = ""; $current_plan_id = ""; /*if($reg_type1=="1") { $path="job_add_1.php"; } else{ $path="job_add.php"; }*/ //for new invoice $current_rate = 0; $current_rate1 = 0; $cntShortlisted1 = 0; $remainingShortlist1 = 0; $positions1 = 0;
/** * @param $raw_item * @param int $dborder * * @return \RokSprocket_Item */ protected function convertRawToItem($raw_item, $dborder = 0) { $item = new RokSprocket_Item(); $item->setProvider($this->provider_name); $item->setId($raw_item->post_id); $item->setAuthor($raw_item->display_name ? $raw_item->display_name : $raw_item->user_nicename); $item->setAuthor($raw_item->user_nicename); $item->setTitle($raw_item->post_title); $item->setDate($raw_item->post_date); $item->setPublished($raw_item->post_status == "publish" ? true : false); $item->setText(strip_shortcodes($raw_item->post_content)); $item->setCategory($raw_item->category_title); $item->setHits(null); $item->setRating(null); $item->setMetaKey(null); $item->setMetaDesc(null); $item->setMetaData(null); //Set up texts array $texts = array(); $text_fields = self::getFieldTypes(array("txt", "desc")); if (count($text_fields)) { $text = ''; foreach ($text_fields as $field) { $texts['text_' . $field->name] = getFieldValue($raw_item->post_id, $field->name, $field->table); } } $texts = $this->processPlugins($texts); $item->setTextFields($texts); //set up images array $images = array(); $image_fields = self::getFieldTypes("file"); if (count($image_fields)) { $image = ''; foreach ($image_fields as $field) { $image = new RokSprocket_Item_Image(); $image->setSource(getFieldValue($raw_item->post_id, $field->name, $field->table)); $image->setIdentifier('image_' . $field->name); $image->setCaption(''); $image->setAlttext(''); $images[$image->getIdentifier()] = $image; } } $item->setImages($images); $item->setPrimaryImage($images['image_thumbnail']); //set up links array $links = array(); $link_fields = self::getFieldTypes("txt"); if (count($text_fields)) { $link = ''; foreach ($link_fields as $field) { $link_field = new RokSprocket_Item_Link(); $link_field->setUrl(getFieldValue($raw_item->post_id, $field->name, $field->table)); $link_field->setText(''); $links['url_' . $field->name] = $link_field; } } $item->setLinks($links); $primary_link = null; // $primary_link = new RokSprocket_Item_Link(); // $primary_link->setUrl(get_permalink($raw_item->post_id)); // $primary_link->getIdentifier('article_link'); // $item->setPrimaryLink($primary_link); $item->setCommentCount($raw_item->comment_count); if (!empty($raw_item->tags)) { $item->setTags($raw_item->tags); } $item->setDbOrder($dborder); return $item; }
} else { $c++; if($c >= $column_size) $c=0; }*/ $pid = explode("_", $field); if (!stristr($field, "custom")) { if ($pfields[$pid[2]] == 1) { ?> <td class="heading "><?php echo LangUtil::$generalTerms[$combined_fields[$field]]; ?> </td> <td><?php echo getFieldValue($pid[2], $previous_daily_num); ?> </td><td width="15px" style="border:none"></td> <?php } else { $c--; } } else { if (in_array($pid[2], $report_config->patientCustomFields)) { ?> <td class="heading"><?php echo $combined_fields[$field]; ?> </td> <td><?php
} $addvar = $addvalue = ''; if (!empty($dede_fields)) { $fieldarr = explode(';', $dede_fields); if (is_array($fieldarr)) { foreach ($fieldarr as $field) { if ($field == '') { continue; } $fieldinfo = explode(',', $field); if ($fieldinfo[1] == 'htmltext' || $fieldinfo[1] == 'textdata') { ${$fieldinfo[0]} = filterscript(stripslashes(${$fieldinfo[0]})); ${$fieldinfo[0]} = addslashes(${$fieldinfo[0]}); ${$fieldinfo[0]} = getFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'member'); } else { ${$fieldinfo[0]} = getFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'member'); } $addvar .= ', `' . $fieldinfo[0] . '`'; $addvalue .= ", '" . ${$fieldinfo[0]} . "'"; } } } $query = "INSERT INTO `{$diy->table}` (`id`, `ifcheck` {$addvar}) VALUES (NULL, 0 {$addvalue})"; if ($dsql->ExecuteNoneQuery($query)) { $goto = "diy_list.php?action=list&diyid={$diy->diyid}"; showmsg('发布成功', $goto); } else { showmsg('对不起,发布不成功', '-1'); } } }
<td width="700px" height="400" valign="top"><table align="left" cellpadding="0" cellspacing="0" border="0" width="98%" > <tr> <td height="50" class="recheading" ><span class="heading_black"> Subscribed to plan successfully! </span></td> </tr> <tr> <td><img src="../images/line.gif" width="772"></td> </tr> <tr> <td valign="top"> <table width="100%" cellpadding="3" cellspacing="0"> <tr> <td width="16"> </td> <td width="754"> This recruiter successfully subscribed to our plan - <?php echo getFieldValue("job_rec_payment_plans", "plan_name", "plan_id", $_GET["plan"]); ?> <br> <br> </td> </tr> </table> </td> </tr> <tr> <td height="150"> </td> </tr> </table> </td> </tr>
$rsexits = getFieldValue($DBPrefix . "keywords", "keyword='" . encode($_POST['name']) . "'", "id"); if ($rsexits != $mark_id && $rsexits != "") { $ActionMessage = "{$strDataExists}"; $action = "edit"; } else { if ($linkImage != "") { $sql = "update " . $DBPrefix . "keywords set keyword='" . encode($_POST['name']) . "',linkUrl='" . encode($_POST['linkUrl']) . "',linkImage='" . encode($linkImage) . "' where id='{$mark_id}'"; } else { $sql = "update " . $DBPrefix . "keywords set keyword='" . encode($_POST['name']) . "',linkUrl='" . encode($_POST['linkUrl']) . "' where id='{$mark_id}'"; } $DMC->query($sql); $action = ""; } } else { //新增 $rsexits = getFieldValue($DBPrefix . "keywords", "keyword='" . encode($_POST['name']) . "'", "id"); if ($rsexits != "") { $ActionMessage = "{$strDataExists}"; $action = "add"; } else { $sql = "INSERT INTO " . $DBPrefix . "keywords(keyword,linkUrl,linkImage) VALUES('" . encode($_POST['name']) . "','" . encode($_POST['linkUrl']) . "','" . encode($linkImage) . "')"; $DMC->query($sql); $action = ""; } } if ($action == "") { keywords_recache(); } } } //其它操作行为:编辑、删除等
} $sql = "update {$DBPrefix}members set nickname='{$_POST[nickname]}',email='{$_POST['email']}',isHiddenEmail='" . $_POST['isHiddenEmail'] . "',homePage='{$_POST['homePage']}'" . $passSql . " where username='******'username']}'"; $DMC->query($sql); $ActionMessage = "{$strRegSucc1}"; } } } else { //新增 //检测昵称 if ($_POST['nickname'] != "") { $nickrsexits = getFieldValue($DBPrefix . "members", "username='******'nickname']}' or nickname='{$_POST['nickname']}'", "username"); $check_info = $nickrsexits != "" ? 0 : 1; } //检测用户名 if ($check_info == 1) { $userexits = getFieldValue($DBPrefix . "members", "username='******'addusername']}' or nickname='{$_POST['addusername']}'", "username"); $check_info = $userexits != "" ? 0 : 1; } if ($check_info == 0) { $ActionMessage = $nickrsexits != "" ? "{$strCurUserExists}" : "{$strRegisterInvaild}"; } else { $sql = "INSERT INTO " . $DBPrefix . "members(username,password,email,isHiddenEmail,homePage,lastVisitTime,lastVisitIP,regIp,hashKey,role,nickname) VALUES ('{$_POST['addusername']}',md5('" . $_POST['addpassword'] . "'),'{$_POST['email']}','{$_POST['isHiddenEmail']}','{$_POST['homePage']}','" . time() . "','" . getip() . "','" . getip() . "','','member','{$_POST['nickname']}')"; $DMC->query($sql); $ActionMessage2 = "{$strRegSucc}"; } } members_recache(); settings_recount("members"); settings_recache(); } }