예제 #1
0
function pp_getLink($text, $url, $modal = False)
{
    global $moo;
    if (!$moo) {
        $moo = new moo();
    }
    if ($modal) {
        return $moo->popup($text, $url, 1, "input");
    } else {
        return $moo->popup($text, $url, 0, "input", 0, 1);
    }
}
예제 #2
0
    function getHeader($bannerText = '')
    {
        if ($this->headerSent() || core_getOption('CLI')) {
            return;
        }
        $this->parse_GET();
        if ($bannerText) {
            $this->bannerText = $bannerText;
        }
        if ($_SERVER["HTTPS"] == 'on') {
            $this->ref = $this->refSSL;
        } else {
            $this->ref = $this->home;
        }
        if (!$this->headerToShow) {
            $this->menuToShow = False;
        }
        if (!$this->menuToShow) {
            $this->alignCenter = True;
        }
        if (!$this->title) {
            $this->title = strip_tags($this->bannerText);
        }
        #preg_replace("/^<.*>(.*)<.*>$/",'\1',$this->bannerText);
        if (!$this->revision) {
            $this->revision = date("Ymd", getlastmod());
        }
        $fullWidth = !$this->menuToShow ? 'wide-' : '';
        if ($a = $GLOBALS["authClass"]) {
            if ($a->authenticated()) {
                unset($this->loginPage);
            }
        }
        if (FALSE) {
            if ($l = $this->loginPage) {
                $this->loginIcon = "<a href='" . $l . "'><img src='img/user_locked_16x16.png' border='0' alt='login'></a>";
            }
        } else {
            $moo = new moo();
            if ($l = $this->loginPage) {
                $this->loginIcon = $moo->popup("<img src='img/user_locked_16x16.png' border='0' alt='login'>", $l, True, True, True);
            }
        }
        if ($_GET["modal"] != 'yes') {
            ?>
<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'>
<html lang='en'>
  <head>
    <title><?php 
            echo $this->title;
            ?>
</title>
    <meta http-equiv='content-type'        content='text/html; charset=utf-8'>
    <meta http-equiv='content-style-type'  content='text/css'>
    <meta http-equiv='content-script-type' content='text/javascript'>
    <meta http-equiv='pragma'              content='no-cache'>
    <meta http-equiv='cache-control'       content='no-cache, must-revalidate'>
    <meta http-equiv='expires'             content='0'>
    <meta http-equiv='imagetoolbar'        content='no'>
    <meta name='robots'                 content='index,follow'>
    <meta name='author'                 content='<?php 
            echo $this->author;
            ?>
'>
    <meta name='date-revision-yyyymmdd' content='<?php 
            echo $this->revision;
            ?>
'>
    <meta name='description'            content='NORDITA - Nordic Institute for Theoretical Physics'>
    <meta name='keywords'               content='NORDITA, Nordic Institute for Theoretical Physics, nordic, theoretical physics, physics, astrophysics, nuclear physics, astrobiology, high energy physics, condensed matter physics, condensed matter, string theory, particle physics, '>
    <link rel='shortcut icon' href='img/favicon_star.png'>
    <link type='text/css' rel='stylesheet' media='screen' href='css/screen.css'>
    <link type='text/css' rel='stylesheet' media='print'  href='css/print.css'>
<?php 
            $this->getJS_CSS();
            ?>
    <script type='text/javascript'>if (self != top) top.location=self.location</script>
  </head>
  <body>
<?php 
            $this->norditaHead();
            $this->menu();
            ?>
    <div id='container-<?php 
            print $fullWidth;
            ?>
body'>
      <div id='block-main'>
        <hr class='hidden'>
        <div id='div-main-content'>
<?php 
        }
        $this->headerSent('yes');
    }
예제 #3
0
        $limit = array($_REQUEST['st'], $this->go);
        $this->DB->build(array('select' => '*', 'from' => array('gallery_albums' => 'a', 'gallery_images' => 'i'), 'where' => 'i.image_album_id=a.album_id', 'limit' => $limit));
        $this->DB->execute();
        if (!$this->DB->getTotalRows()) {
            echo 'Complete';
            exit;
        }
        while ($row = $this->DB->fetch()) {
            $rows[] = $row;
        }
        return $rows;
    }
    public function process($row)
    {
        if ($_REQUEST['reverse']) {
            $this->DB->update('gallery_images', array('image_album_id' => $row['album_id']), 'image_member_id=' . $row['album_owner_id']);
        } else {
            $this->DB->update('gallery_images', array('image_member_id' => $row['album_owner_id']), 'image_album_id=' . $row['album_id']);
        }
    }
}
// Init
$moo = new moo();
// Get posts
$loop = $moo->load();
// Loop through
foreach ($loop as $row) {
    $moo->process($row);
}
// Next
echo "Up to {$moo->next} done\r\n\t<script type='text/javascript'>window.location = '{$_SERVER['PHP_SELF']}?st={$moo->next}';</script>";
예제 #4
0
function pp_button($mode, $compal1 = False, $compal2 = False)
{
    global $row, $NOR_modes, $moo;
    if ($compal1 && !trim($row[$compal1])) {
        return "";
    }
    if ($compal2 && !trim($row[$compal2])) {
        return "";
    }
    if (!$moo) {
        $moo = new moo();
    }
    return x("a href='edit_preprints.php?nor_pp_period=" . urlencode($nor_pp_period) . "&amp;rowId=" . urlencode($row[RowId]) . "&amp;nor_pp_mode=" . urlencode($mode) . "'", $moo->tip("<img src='img/" . $NOR_modes[$mode]["i"] . "' border='0' alt='' valign='bottom'>", $NOR_modes[$mode]["d"]));
}