예제 #1
0
파일: action.php 프로젝트: neivin/WatTools
    case 'set_current_revision':
        // take input as a number
        $revision = $postdata;
        if (!is_numeric($revision)) {
            die('Non numeric input.');
        }
        // get revisions data and check if the request makes sense
        $revisions = get_revisions_data();
        if ($revision > count($revisions['revisions']) || $revision < 0) {
            die('Selected revision does not exist.');
        }
        // update current revision
        $revisions['current'] = $revision;
        // save new revisions list
        save_revisions_data($revisions);
        die('1');
        break;
    case 'login':
        if (check_admin_password($_POST['password']) === false) {
            die('Wrong password.');
        }
        log_in();
        die('1');
        break;
    case 'logout':
        log_out();
        break;
    default:
        die('Unknown action.');
        break;
}
예제 #2
0
파일: step6.php 프로젝트: poef/ariadne
        set_progress("install_base_package", 100);
        if ($install_demo) {
            $target_id = "install_demo";
            set_progress("install_demo", 0);
            include "install_demo_package.php";
            set_progress("install_demo", 100);
        }
        if ($install_libs) {
            set_progress("install_libs", 0);
            set_progress("install_libs", 100);
        }
        if ($install_docs) {
            set_progress("install_docs", 0);
            set_progress("install_docs", 100);
        }
        if (check_admin_password(array($admin_pass, $admin_pass_repeat))) {
            $new_admin_password = $admin_pass;
            include "set_admin_password.php";
        }
        /*
        	FIXME:
        	5. Remove write grants on ariadne.phtml
        	6. Remove read grants on the installation directory
        
        	Done!
        */
        ?>
					<h2><?php 
        echo $ARnls['install:success'];
        ?>
</h2>
예제 #3
0
     if ($ok) {
         check_mysql_runquery("INSERT INTO version SET version='" . $version . "', date=NOW()");
     }
     if ($ok) {
         display_link("Cliquez ici pour continuer", 'index.php?step=' . ($step + 1));
     } else {
         display_link("V&eacute;rifiez vos identifiants", 'index.php?step=' . ($step - 3));
         echo " ou ";
         display_link("Recr&eacute;ez vos tables", 'index.php?step=' . ($step - 1));
     }
     break;
 case 8:
     display_menu();
     display_title();
     session_start();
     $data = check_admin_password();
     if (count($data['errors'])) {
         foreach ($data['errors'] as $error) {
             $msg = '';
             if ($error['level'] == 'error') {
                 $msg .= _LOGO_ERROR;
             } elseif ($error['level'] == 'warning') {
                 $msg .= _LOGO_WARNING;
             } elseif ($error['level'] == 'good') {
                 $msg .= _LOGO_GOOD;
             }
             $msg .= $error['message'];
             display_message($msg);
         }
     }
     if ($data['caninstall']) {