Пример #1
0
unset($parse);
// Only keep legit comments or this script will take days to run...
$comments_to_keep = array();
for ($c = 0; $c < count($data['comment']); $c++) {
    if (intval($data['comment'][$c]['visible']) == 1) {
        $comments_to_keep[] = $data['comment'][$c];
    }
}
$data['comment'] = $comments_to_keep;
show_progress('Adding data to WP...');
// Associate data to entries, add to WP
$fp = fopen('text_more.sql', 'w');
foreach ($data['entry'] as $old_id => &$entry) {
    /*
    $post = array(
    	'ID'			=> $entry['id'],
    	'post_content'	=> $entry['text']
    );
    
    $id = wp_update_post($post);
    */
    $id = $entry['id'];
    fwrite($fp, vsprintf("UPDATE wp_posts SET post_content = '%s' WHERE ID = %d;\r", array($entry['text'], $id)));
    if (!empty($entry['text_more'])) {
        show_progress($id, ' ');
    }
}
unset($data);
fclose($fp);
show_progress('<br />Done!');
Пример #2
0
        return_error($error['message']);
    }
}
register_shutdown_function('shutdown');
if (!$is_already_sync) {
    if (!$recover) {
        $requete = "insert into source_sync (source_id,nrecu,ntotal,date_sync) values({$source_id},0,0,now())";
        $r = mysql_query($requete);
    } else {
        $requete = "update source_sync set cancel=0 where source_id={$source_id}";
        $r = mysql_query($requete);
    }
    if ($r) {
        $n_maj = $conn->maj_entrepot($source_id, "show_progress", $recover, $recover_env);
        if (!$conn->error) {
            show_progress(1, $n_maj, $n_maj);
            print "document.getElementById('cancel_sync').style.visibility='hidden';";
            print "document.getElementById('get_back').style.visibility='visible';";
            print "document.getElementById('sync_message').innerHTML='" . htmlentities($msg["connecteurs_sync_syncover"], ENT_QUOTES, $charset) . "'";
            $requete = "delete from source_sync where source_id=" . $source_id;
            mysql_query($requete);
            $requete = "update connectors_sources set last_sync_date=now() where source_id=" . $source_id;
            mysql_query($requete);
        } else {
            if ($conn->break_maj($source_id)) {
                $requete = "delete from source_sync where source_id=" . $source_id;
            } else {
                $requete = "update source_sync set cancel=2 where source_id=" . $source_id;
            }
            mysql_query($requete);
            return_error($conn->error_message);
Пример #3
0
        check_installed_file_exists() ? header('Location: ../magmi.php') : "";
        show_progress(2);
        step_2();
        break;
    case '3':
        check_installed_file_exists() ? header('Location: ../magmi.php') : "";
        show_progress(3);
        step_3();
        break;
    case '4':
        show_progress(4);
        step_4();
        break;
    default:
        check_installed_file_exists() ? header('Location: ../magmi.php') : "";
        show_progress(1);
        step_1();
}
?>

</div>
</div><!-- /actions -->
<div style="clear:both;"></div>
</div><!-- /container -->	
	<div class="grid_12 footer">
		<!--<a href="#">-->
			<div class="footer-left"> </div>
			<div class="footer-right">
				<div class="designed-by">
					<a class="desined_by" target="_blank" href="http://dzine-hub.com">Designed by <img style="vertical-align:middle;" src="images/dz_logo.jpg"/></a>
				</div>
Пример #4
0
 }
 if (!isset($argument[2])) {
     $argument[2] = '';
 }
 $validCommand = array('quit', 'exit', 'show_progress', 'delete_result', 'help', 'show_file', 'cls', 'optab', '', 'check');
 if (!in_array($argument[0], $validCommand)) {
     echo "Invalid command\n";
     help_menu();
 } else {
     if ($argument[0] == '' || $argument[0] == "quit" || $argument[0] == "exit") {
         echo "";
         echo "\n";
         $exitProgram = true;
     } else {
         if ($argument[0] == 'show_progress') {
             show_progress();
         } else {
             if ($argument[0] == 'delete_result') {
                 delete_result();
             } else {
                 if ($argument[0] == 'help') {
                     help_menu();
                 } else {
                     if ($argument[0] == 'show_file') {
                         show_file();
                     } else {
                         if ($argument[0] == "cls") {
                             system("cls");
                         } else {
                             if ($argument[0] == "optab") {
                                 display_optab();