示例#1
0
    $i++;
    $t[$i]->type = 'data';
    $t[$i]->desc = $l['reg-template'];
    $t[$i]->value = $st;
    $i++;
    $t[$i]->type = 'submit';
    $t[$i]->value = $l['submit'];
    $t[$i]->center = true;
    //$t[$i]->desc = " ";
    // check for errors
    $errors = '';
    if ($baddata) {
        $errors = '<div class="error">' . $l['data-problems'] . '<br />';
        foreach ($problems as $p) {
            $errors .= '<li>' . $p . "</li>\n";
        }
        $errors .= "</div> \n";
    }
    $ets->page_body = $errors . build_form($t, $form, $table, $clean);
}
$ets_outter->main_title = $config->get('site_name') . ': ' . $l['title-newuser'];
$ets_outter->page_title = $l['title-newuser'];
$ets_outter->sitenav = buildMainNav($l, $user);
$ets_outter->script_path = script_path;
$ets_outter->recent_blogs = $blog->getRecent($config);
$ets_outter->query_count = $db->getQueryCount();
$ets_outter->gen_time = mymicrotime($start, 5);
$ets_outter->welcome[] = $user->getWelcomeTags();
printt($ets_outter, skin_header);
printt($ets, skin_basic);
printt($ets_outter, skin_footer);
示例#2
0
        $b['subject'] = addslashes($b['subject']);
        $b['blog'] = addslashes($b['blog']);
        $b['custom'] = addslashes($b['custom']);
        $b['mood'] = addslashes($b['mood']);
    }
    $a_id = $name_id[$b['author']];
    // get author's ID number
    $access = $access_2_3[$b['status']];
    $db->query('INSERT INTO `nlb3_blogs` ( `blog_id` , `author_id` , `date` , `subject` , `body` , `custom` , `mood` , `comments` , `html` , `smiles` , `bb` , `access` , `views` )
	VALUES (' . "\r\n\t'{$b['id']}', \r\n\t'{$a_id}', \r\n\t'{$b['date']}', \r\n\t'{$b['subject']}', \r\n\t'{$b['blog']}', \r\n\t'{$b['custom']}', \r\n\t'{$b['mood']}', \r\n\t'{$b['comments']}',  \r\n\t'{$b['html']}', \r\n\t'{$b['smiles']}', \r\n\t'{$b['bb']}', \r\n\t'{$access}', \r\n\t'0');");
}
unset($all_blogs);
//
//	INSERT COMMENTS
//
foreach ($all_com as $c) {
    if (!isset($name_id[$c['author']])) {
        $a_id = -1;
    } else {
        $a_id = $name_id[$c['author']];
    }
    if (isset($_GET['old']) && $_GET['old'] == 'true') {
        $c['comment'] = addslashes($c['comment']);
    }
    $db->query('INSERT INTO `nlb3_comments` ( `comment_id` , `parent_id` , `author_id` , `date` , `body` , `ip` )
	VALUES (' . "\r\n\t'{$c['id']}', \r\n\t'{$c['parent']}', \r\n\t'{$a_id}', \r\n\t'{$c['date']}', \r\n\t'{$c['comment']}', \r\n\t'127.0.0.1'\r\n\t);");
}
unset($all_com);
echo "Done.";
echo "<br>Took " . mymicrotime($START, 5) . " seconds and " . $db->getQueryCount() . " querys.";
echo '<p><font size="+5" color="red">DELETE THIS FILE <B><U>NOW</U></B></FONT>';
示例#3
0
	-----------------------------------------
	This product is distributed under the GNU
	GPL liscense. A copy of that liscense 
	should be packaged with this product.
	-----------------------------------------
*/
require_once 'config.php';
require_once 'system/functions.php';
require_once 'system/ets_file.php';
require_once 'system/sqldb2.class.php';
require_once 'system/nlb_blog.class.php';
require_once 'system/nlb_user.class.php';
require_once 'system/nlb_config.class.php';
require_once 'system/text.class.php';
require_once 'ets.php';
$start = mymicrotime();
$db = new sqldb2($DB_CONFIG);
$config = new nlb_config($db);
$blog = new nlb_blog($db);
$user = new nlb_user($db);
$user->checklogin();
if (!isset($_POST['parent']) || empty($_POST['parent'])) {
    jsRedirect('index.php');
}
$parent = $_POST['parent'];
// get some info about this blog
$info = $db->getArray('SELECT access, comments FROM ' . db_blogs . ' WHERE blog_id="' . $parent . '" LIMIT 1;');
// if anything goes wrong, decide where we will go.
if ($info['access'] == access_news) {
    $go = build_link('index.php', array('action' => 'comment', 'id' => $parent));
} else {