示例#1
0
    plugin_runphp('trackbacksending');
    @header("Content-Type: text/html; charset=utf-8");
    $url = str_replace('{host}', $_SERVER['HTTP_HOST'], $url);
    foreach ($pingurl as $durl) {
        $result = sendping($durl, $title, $excerpt, $url, $blog_name);
        if (!$result) {
            $showp .= "<b>{$lna[316]}</b>{$durl} ; <b>{$lna[317]}</b>{$lna[318]}";
        } elseif ($result == 'ok') {
            $showp .= "<b>{$lna[316]}</b>{$durl} ; <b>{$lna[317]}</b>{$lna[319]}<br>";
        } elseif ($result == 'unknown') {
            $showp .= "<b>{$lna[316]}</b>{$durl} ; <b>{$lna[317]}</b>{$lna[949]}<br>";
        } else {
            $showp .= "<b>{$lna[316]}</b>{$durl} ; <br><b>{$lna[317]}</b>{$lna[950]}{$result}<br>";
        }
    }
    plugin_runphp('trackbacksent');
    $t = new template();
    $t->showtips("{$lna[320]}", "{$lna[321]}<br><br>" . $showp . "<br><br>{$lna[322]}", "{$partbacktoart}|{$url}");
}
function autoselect($name, $arrayoption, $arrayvalue, $selectedid = 0, $disabled = 0)
{
    if (empty($selectedid)) {
        $selectedid = 0;
    }
    if ($disabled == 1) {
        $wdisabled = " disabled='disabled' ";
    }
    $formcontent .= "<select name='{$name}' id='{$name}' class='formselect' {$wdisabled}>";
    for ($i = 0; $i < count($arrayoption); $i++) {
        if ($selectedid == $i) {
            $wselected = "selected='selected'";
示例#2
0
            setcookie('userpsw', $password);
        } else {
            $savecookielong = 3600 * 24 * 30;
            setcookie('userid', $userid, time() + $savecookielong);
            setcookie('userpsw', $password, time() + $savecookielong);
        }
        $redirection = array("{$lnc[309]}|{$urlreturn}", "{$lnc[163]}|index.php");
        if ($try['usergroup'] == '2') {
            $redirection[] = "{$lnc[107]}|admin.php";
            $redirection[] = "{$lnc[108]}|admin.php?act=edit";
        }
        catchsuccess("{$lnc[167]} " . $username, $redirection);
    }
}
if ($job == 'logout') {
    plugin_runphp('logoutprocess');
    define('isLogout', 1);
    setcookie('userid', '', time() - 3600);
    setcookie('userpsw', '', time() - 3600);
    catchsuccess($lnc[168], "{$lnc[163]}|index.php");
}
if ($job == 'applylink') {
    checkpermission('ApplyLink');
    $mycode1 = "<a href=\"{$config['blogurl']}\" target=\"_blank\" title=\"{$config['blogname']}\">{$config['blogname']}</a>";
    $mycode2 = "<a href=\"{$config['blogurl']}\" target=\"_blank\"><img src=\"{$config['bloglogo']}\"  title=\"{$config['blogname']}\" alt=\"{$config['blogname']}\" border=\"0\"/></a>";
    $mycode1 = htmlspecialchars($mycode1);
    $mycode2 = htmlspecialchars($mycode2);
    $t = new template();
    $actionnow = $lnc[109];
    $jobs = "login.php?job=doapplylink";
    $formbody .= $t->set('form_eachline', array('text' => "*{$lnc[169]}", 'formelement' => "<input type='text' class='text' size='20' name='sitename' />"));
示例#3
0
     }
     if (!empty($try['adminreptime'])) {
         catcherror($lnc[303]);
     }
     if (time() - $try['reptime'] > $mbcon['editcomment']) {
         catcherror($lnc[303]);
     }
 }
 $reptime = time();
 if ($suspectspam == 1) {
     $reproperty += 2;
 }
 //Start storage
 if ($job == 'addreply' || $job == 'addmessage') {
     setcookie('lastpost', time(), time() + $permission['MinPostInterval']);
     plugin_runphp('visitorsubmit');
     $blog->query("INSERT INTO  `{$targettable}` VALUES ('{$currentmaxid}', '{$reproperty}', {$plusquery_c} '{$reptime}', '{$replierid}', '{$replier}', '{$v_repemail}', '{$v_repurl}', '{$userdetail['ip']}', '{$v_content}', '{$html}', '{$ubb}', '{$emot}', '0', '', '0', '', '0', '', '0', '{$v_reppsw}', '', '', '', '', '', '', '')");
     $blog->query("UPDATE `{$db_prefix}maxrec` SET `{$alter_column}`='{$currentmaxid}'");
 } else {
     $blog->query("UPDATE `{$db_prefix}{$valuedtable}` SET `reptime`='{$reptime}', `repcontent`='{$v_content}' WHERE `repid`='{$repid}' LIMIT 1");
     $try['reptime'] = $reptime;
     $try['repcontent'] = $v_content;
 }
 if ($suspectspam == 1) {
     $tipsplus = $mbcon['censorall'] == '1' ? "<br/>{$lnc[270]}" : "<br/>{$lnc[215]}";
     if ($ajax == 'on') {
         catcherror(strip_tags($tipsplus));
     }
 }
 if (($job == 'addreply' || $job == 'editreply') && $suspectspam != 1) {
     include "admin/cache_func.php";
示例#4
0
            } elseif ($tmpsinglereplyarray[1] == 'all') {
                $cache_replies_all[] = $replyarrayasigned;
            }
        }
    }
    $listrepliesitem = $permission['SeeHiddenReply'] == 1 ? $cache_replies_all : $cache_replies_limit;
    if ($listrepliesitem) {
        $replies_list = "<ul>";
        for ($i = 0; $i < count($listrepliesitem); $i++) {
            $addintionalcssclass = $i % 2 == 0 ? 'rowcouple' : 'rowodd';
            $listrepliesitems = $listrepliesitem[$i];
            $replies_list .= "<li class='{$addintionalcssclass}'><a href=\"" . getlink_entry($listrepliesitems['blogid'], $listrepliesitems['blogalias']) . "#blogcomment{$listrepliesitems['repid']}\" title=\"[{$listrepliesitems['replier']}] - {$listrepliesitems['title']}\">{$listrepliesitems['repcontent']}</a></li>";
        }
        $replies_list .= "</ul>";
    }
    plugin_runphp('sidebarreplies');
    $blogitem['replies'] += array('type' => 'block', 'name' => 'replies', 'title' => $lnc[114], 'content' => $replies_list, 'extend' => 1);
}
//[End]replies
//[Start]calendar
if (in_array('calendar', $allopenmods)) {
    if (file_exists("data/cache_currentmonthentries.php")) {
        include "data/cache_currentmonthentries.php";
    }
    acceptrequest('cm,cy');
    $cm = floor($cm);
    $cy = floor($cy);
    $cm = $cm <= 0 || $cm > 12 ? $nowtime['month'] : $cm;
    $cy = $cy <= 1970 || $cy > 2100 ? $nowtime['year'] : $cy;
    $month_calendar = array();
    if ($cy == $nowtime['year'] && $cm == $nowtime['month']) {
示例#5
0
function metaWeblog_editPost($values)
{
    global $config, $defualtcategoryid, $db_prefix, $mbconfig;
    $struct = $values['struct'];
    $userdetail = check_user($values['username'], $values['password']);
    $blog = new boblog();
    $values['postid'] = floor($values['postid']);
    $records = $blog->getgroupbyquery("SELECT * FROM `{$db_prefix}blogs` WHERE `blogid`='{$values['postid']}'");
    if ($records[0]['blogid'] == '') {
        xml_error("Entry does not exist.");
    }
    if (!$struct['title']) {
        $title = "Untitled MetaWeblogAPI Entry";
    } else {
        $title = safe_convert($struct['title']);
    }
    if (!$struct['description']) {
        xml_error("You MUST provide a decription element in your post.");
    } else {
        $content = reduce_entities($struct['description']);
    }
    $nowtime = time();
    if ($struct['pubDate']) {
        $struct['dateCreated'] = $struct['pubDate'];
    }
    if ($struct['dateCreated']) {
        $time = get_time_unix($struct['dateCreated']) + 3600 * $config['timezone'];
    } else {
        $time = $records[0]['pubtime'];
    }
    $newcym = date("Ym", $time);
    $newcd = date("d", $time);
    $blog->query("UPDATE `{$db_prefix}calendar` SET cyearmonth='{$newcym}', cday='{$newcd}' WHERE `cid`='{$values['postid']}'");
    //writetofile ('text5.php', $struct['categories']); //For debug only
    if ($struct['categories'] != '') {
        $c_tmp = $blog->getgroupbyquery("SELECT cateid FROM `{$db_prefix}categories` WHERE `catename`='{$struct['categories']}'");
        $category = $c_tmp[0]['cateid'];
        if ($category == '') {
            $category = $defualtcategoryid;
        }
    } else {
        $category = $records[0]['category'];
    }
    if ($values['publish'] == 1 && $struct['flNotOnHomePage'] != 1) {
        $property = 0;
    } else {
        $property = 3;
    }
    $query = "UPDATE `{$db_prefix}blogs` SET `title`='{$title}', `pubtime`='{$time}', `property`='{$property}', `category`='{$category}', `content`='{$content}', `editorid`='{$userdetail['userid']}', `edittime`='{$nowtime}' WHERE `blogid`='{$values['postid']}'";
    recache_latestentries();
    recache_currentmonthentries();
    recache_categories();
    //Update Category counter
    $blog->query($query);
    plugin_runphp('metaweblogedit');
    $xml_content = make_xml_piece("boolean", '1');
    $body_xml = xml_generate($xml_content);
    send_response($body_xml);
}
示例#6
0
<?php

if (!defined('VALIDADMIN')) {
    die('Access Denied.');
}
$plugin_ubbeditor_buttons = $plugin_ubbeditor_functions = '';
plugin_runphp('ubbeditor');
$srcHTML = "data/cache_emsel.php";
@(include $srcHTML);
$emots = str_replace("<br/>", ' ', $emots);
$emots = str_replace("</a>", '</a> ', $emots);
if ($act == 'edit') {
    $editoreditmodeonly = <<<eot
<a href="JavaScript: void(0); "><IMG border=0 onclick="AddText('[separator]')" title="{$lna[701]}" src="editor/ubb/images/separator.gif" ></a>
<a href="JavaScript: void(0); "><IMG border=0 onclick="AddText('[newpage]')" title="{$lna[702]}" src="editor/ubb/images/newpage.gif" ></a>
eot;
    $editoreditmodeonly2 = <<<eot
<br><span id="timemsg">{$lna[1179]}</span>&nbsp; &nbsp;<span id="timemsg2"></span>
 <script type='text/javascript' src='editor/ubb/autosaver.js'>
</script>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<a href="javascript: stopautosaver();">{$lna[1176]}</a>] | [<a href="javascript: restartautosaver();">{$lna[1175]}</a>] | [<a href="javascript: stopforever();">{$lna[1177]}</a>] | [<a href="javascript: switchtodraft();">{$lna[1173]}</a>] | [<a href="javascript: savedraft();">{$lna[1178]}</a>] | [<a href="javascript: cleardraft();">{$lna[1180]}</a>]
eot;
}
$editorjs = <<<eot
<script type="text/javascript" src="editor/ubb/ubbeditor.js"></script>
<script type="text/javascript">
function insertemot (emotcode) {
\tvar emot="[emot]"+emotcode+"[/emot]";
\tAddText(emot);
\tdocument.getElementById('emotid').style.display='none';
}
示例#7
0
function scheduledpublish()
{
    global $blog, $db_prefix, $nowtime;
    $blog->query("UPDATE `{$db_prefix}blogs` SET `property`=0 WHERE `property`=4 AND `pubtime`<={$nowtime['timestamp']}");
    $affn = db_affected_rows();
    if ($affn > 0) {
        if (!defined('REPLYSPECIAL')) {
            define('REPLYSPECIAL', 1);
        }
        include_once 'admin/cache_func.php';
        recache_latestentries();
        plugin_runphp('plannedpublish');
    }
}