/**
  * \brief Generate the text for this plugin.
  */
 function Output()
 {
     global $PG_CONN;
     global $SysConf;
     if ($this->State != PLUGIN_STATE_READY) {
         return;
     }
     $user_pk = $SysConf['auth']['UserId'];
     /* Get array of groups that this user is an admin of */
     $GroupArray = GetGroupArray($user_pk);
     $V = "";
     /* If this is a POST, then process the request. */
     $Group = GetParm('grouppk', PARM_TEXT);
     if (!empty($Group)) {
         $rc = DeleteGroup($Group);
         if (empty($rc)) {
             /* Need to refresh the screen */
             $text = _("Group");
             $text1 = _("Deleted");
             $V .= displayMessage("{$text} {$GroupArray[$Group]} {$text1}.");
         } else {
             $V .= displayMessage($rc);
         }
     }
     /* Build HTML form */
     $text = _("Delete a Group");
     $V .= "<h4>{$text}</h4>\n";
     $V .= "<form name='formy' method='POST' action=" . Traceback_uri() . "?mod=group_delete>\n";
     /* Get array of users */
     $UserArray = Table2Array('user_pk', 'user_name', 'users');
     /* Remove from $GroupArray any active users.  A user must always have a group by the same name */
     foreach ($GroupArray as $group_fk => $group_name) {
         if (array_search($group_name, $UserArray)) {
             unset($GroupArray[$group_fk]);
         }
     }
     if (empty($GroupArray)) {
         $text = _("You have no groups you can delete.");
         echo "<p>{$text}<p>";
         return;
     }
     reset($GroupArray);
     if (empty($group_pk)) {
         $group_pk = key($GroupArray);
     }
     $text = _("Select the group to delete:  \n");
     $V .= "{$text}";
     /*** Display group select list, on change request new page with group= in url ***/
     $V .= Array2SingleSelect($GroupArray, "grouppk", $group_pk, false, false);
     $text = _("Delete");
     $V .= "<input type='submit' value='{$text}'>\n";
     $V .= "</form>\n";
     if (!$this->OutputToStdout) {
         return $V;
     }
     print "{$V}";
     return;
 }
Example #2
0
function _loopMsgs($sth_msgs, $high_pointer = null, $anonymous = null)
{
    if (!$high_pointer) {
        $high_pointer = 0;
    }
    $low_pointer = $high_pointer;
    while ($row_msgs = @mysql_fetch_assoc($sth_msgs)) {
        displayMessage($row_msgs, $anonymous);
        echo "<tr><td>&nbsp;</td></tr>";
        $high_pointer = $row_msgs['id'] > $high_pointer ? $row_msgs['id'] : $high_pointer;
        $low_pointer = $row_msgs['id'];
    }
    return array($high_pointer, $low_pointer);
}
 function sendMail()
 {
     // From, to, subject, message ...
     $email_from = $_POST['email'];
     $email_to = "*****@*****.**";
     $email_subject = "Nouvelle inscription";
     $email_message = "Une nouvelle inscription a ete recue\n\n";
     // Create email headers
     $headers = 'From: ' . $email_from . "\r\n" . 'Reply-To: ' . $email_from . "\r\n" . 'X-Mailer: PHP/' . phpversion();
     // Actually send the mail
     @mail($email_to, $email_subject, $email_message, $headers);
     // Notice the user the mail was sent
     displayMessage("Votre inscription a bien été envoyée.<br/>");
 }
Example #4
0
 /**
  * \brief Given a folder_pk, try to add a job after checking permissions.
  * \param $uploadpk - the upload(upload_id) you want to delete
  *
  * \return string with the message.
  */
 function TryToDelete($uploadpk)
 {
     if (!GetUploadPerm($uploadpk) >= Auth::PERM_WRITE) {
         $text = _("You dont have permissions to delete the upload");
         return DisplayMessage($text);
     }
     $rc = $this->Delete($uploadpk);
     if (!empty($rc)) {
         $text = _("Deletion Scheduling failed: ");
         return DisplayMessage($text . $rc);
     }
     /* Need to refresh the screen */
     $URL = Traceback_uri() . "?mod=showjobs&upload={$uploadpk} ";
     $LinkText = _("View Jobs");
     $text = _("Deletion added to job queue.");
     $msg = "{$text} <a href={$URL}>{$LinkText}</a>";
     return displayMessage($msg);
 }
 /**
  * \brief Generate the text for this plugin.
  */
 function Output()
 {
     if ($this->State != PLUGIN_STATE_READY) {
         return;
     }
     global $Plugins;
     $V = "";
     switch ($this->OutputType) {
         case "XML":
             break;
         case "HTML":
             /* If this is a POST, then process the request. */
             $uploadpk = GetParm('uploadunpack', PARM_INTEGER);
             if (!empty($uploadpk)) {
                 $P =& $Plugins[plugin_find_id("agent_unpack")];
                 $rc = $P->AgentAdd($uploadpk);
                 if (empty($rc)) {
                     /* Need to refresh the screen */
                     $text = _("Unpack added to job queue");
                     $V .= displayMessage($text);
                 } else {
                     $text = _("Unpack of Upload failed");
                     $V .= displayMessage("{$text}: {$rc}");
                 }
             }
             /* Set default values */
             if (empty($GetURL)) {
                 $GetURL = 'http://';
             }
             //$V .= $this->ShowReunpackView($uploadtree_pk);
             break;
         case "Text":
             break;
         default:
             break;
     }
     if (!$this->OutputToStdout) {
         return $V;
     }
     print "{$V}";
     return;
 }
 /**
  * \brief Generate the text for this plugin.
  */
 function Output()
 {
     if ($this->State != PLUGIN_STATE_READY) {
         return;
     }
     $V = "";
     switch ($this->OutputType) {
         case "XML":
             break;
         case "HTML":
             /* If this is a POST, then process the request. */
             $Folder = GetParm('folder', PARM_INTEGER);
             $GetURL = GetParm('geturl', PARM_TEXT);
             $Desc = GetParm('description', PARM_TEXT);
             // may be null
             $Name = GetParm('name', PARM_TEXT);
             // may be null
             $Accept = GetParm('accept', PARM_TEXT);
             // may be null
             $Reject = GetParm('reject', PARM_TEXT);
             // may be null
             $Level = GetParm('level', PARM_TEXT);
             // may be null
             $public = GetParm('public', PARM_TEXT);
             // may be null
             if (empty($public)) {
                 $public_perm = PERM_NONE;
             } else {
                 $public_perm = PERM_READ;
             }
             if (!empty($GetURL) && !empty($Folder)) {
                 $rc = $this->Upload($Folder, $GetURL, $Desc, $Name, $Accept, $Reject, $Level, $public_perm);
                 if (empty($rc)) {
                     /* Need to refresh the screen */
                     $GetURL = NULL;
                     $Desc = NULL;
                     $Name = NULL;
                     $Accept = NULL;
                     $Reject = NULL;
                     $Level = NULL;
                 } else {
                     $text = _("Upload failed for");
                     $V .= displayMessage("{$text} {$GetURL}: {$rc}");
                 }
             }
             /* Set default values */
             if (empty($Level)) {
                 $Level = 1;
             }
             /* Set default values */
             if (empty($GetURL)) {
                 $GetURL = 'http://';
             }
             /* Display instructions */
             $text22 = _("Starting in FOSSology v 2.2 only your group and any other group you assign will have access to your uploaded files.  To manage your own group go into Admin > Groups > Manage Group Users.  To manage permissions for this one upload, go to Admin > Upload Permissions");
             $V .= "<p><b>{$text22}</b><p>";
             $V .= _("This option permits uploading a single file (which may be iso, tar, rpm, jar, zip, bz2, msi, cab, etc.) or a directory from a remote web or FTP server to FOSSology.\n");
             $V .= _("The file or directory to upload must be accessible via a URL and must not require human interaction ");
             $V .= _("such as login credentials.\n");
             /* Display the form */
             $V .= "<form method='post'>\n";
             // no url = this url
             $V .= "<ol>\n";
             $text = _("Select the folder for storing the uploaded file (directory):");
             $V .= "<li>{$text}\n";
             $V .= "<select name='folder'>\n";
             $V .= FolderListOption(-1, 0);
             $V .= "</select><P />\n";
             $text = _("Enter the URL to the file (directory):");
             $V .= "<li>{$text}<br />\n";
             $V .= "<INPUT type='text' name='geturl' size=60 value='" . htmlentities($GetURL) . "'/><br />\n";
             $text = _("NOTE");
             $text1 = _(": If the URL requires authentication or navigation to access, then the upload will fail. Only provide a URL that goes directly to the file (directory). The URL can begin with HTTP://, HTTPS://, or FTP://.");
             $V .= "<b>{$text}</b>{$text1}<P />\n";
             $text = _("(Optional) Enter a description of this file (directory):");
             $V .= "<li>{$text}<br />\n";
             $V .= "<INPUT type='text' name='description' size=60 value='" . htmlentities($Desc) . "'/><P />\n";
             $text = _("(Optional) Enter a viewable name for this file (directory):");
             $V .= "<li>{$text}<br />\n";
             $V .= "<INPUT type='text' name='name' size=60 value='" . htmlentities($Name) . "'/><br />\n";
             $text = _("NOTE");
             $text1 = _(": If no name is provided, then the uploaded file (directory) name will be used.");
             $V .= "<b>{$text}</b>{$text1}<P />\n";
             $text = _("(Optional) Enter comma-separated lists of file name suffixes or patterns to accept:");
             $V .= "<li>{$text}<br />\n";
             $V .= "<INPUT type='text' name='accept' size=60 value='" . htmlentities($Accept) . "'/><P />\n";
             $text = _("NOTE");
             $text1 = _(": If any of the wildcard characters, *, ?, [ or ], appear in an element of acclist, it will be treated as a pattern, rather than a suffix.");
             $V .= "<b>{$text}</b>{$text1}<P />\n";
             $text = _("(Optional) Enter comma-separated lists of file name suffixes or patterns to reject:");
             $V .= "<li>{$text}<br />\n";
             $V .= "<INPUT type='text' name='reject' size=60 value='" . htmlentities($Reject) . "'/><P />\n";
             $text = _("NOTE");
             $text1 = _(": If any of the wildcard characters, *, ?, [ or ], appear in an element of rejlist, it will be treated as a pattern, rather than a suffix.");
             $V .= "<b>{$text}</b>{$text1}<P />\n";
             $text = _("(Optional) maximum recursion depth (inf or 0 for infinite):");
             $V .= "<li>{$text}<br />\n";
             $V .= "<INPUT type='text' name='level' size=60 value='" . htmlentities($Level) . "'/><P />\n";
             $text1 = _("(Optional) Make Public");
             $V .= "<li>";
             $V .= "<input type='checkbox' name='public' value='public' > {$text1} <p>\n";
             if (@$_SESSION['UserLevel'] >= PLUGIN_DB_WRITE) {
                 $text = _("Select optional analysis");
                 $V .= "<li>{$text}<br />\n";
                 $Skip = array("agent_unpack", "agent_adj2nest", "wget_agent");
                 $V .= AgentCheckBoxMake(-1, $Skip);
             }
             $V .= "</ol>\n";
             $text = _("Upload");
             $V .= "<input type='submit' value='{$text}!'>\n";
             $V .= "</form>\n";
             $V .= "<p><b>{$text22}</b>";
             break;
         case "Text":
             break;
         default:
             break;
     }
     if (!$this->OutputToStdout) {
         return $V;
     }
     print "{$V}";
     return;
 }
Example #7
0
head_tag("Admin LACTOR - " . _("Mother Log In"));
?>
</head>


<body>
<div id="maincontainer">

<?php 
page_header();
admin_menu(2);
?>

<div id="pagecontent">
<?php 
displayMessage('ProxyMessage', 'ProxyDetails', 'ProxyType');
?>
 

<div id="registercontent">

<div id="container">
<ul class="menu">
<li id="breastfeeding" class="active"><?php 
echo _("Mother's Portal");
?>
</li>
</ul>
<span class="clear"></span>

Example #8
0
page_menu(PAGE_PROFILE);
?>

<div id="pagecontent">
<?php 
if (isset($_SESSION['s_mid'])) {
    $_SESSION['Smessage'] = "Logged in as scientist.";
    $_SESSION['Stype'] = 2;
    $_SESSION['Sdetail'] = "";
    displayMessage('Smessage', 'Sdetail', 'Stype');
}
displayNotification();
?>
 
<?php 
displayMessage('ChangePassMessage', 'ChangePassDetails', 'ChangePassType');
?>
 

<div id="registercontent">
<div id="container">
<div class="tabs">
<ul class="menu">
<li><a href="#motherInfo"><?php 
echo _("Mother Information");
?>
</a></li>
<li><a href="#childInfo"><?php 
echo _("Child Information");
?>
</a></li>
Example #9
0
 /**
  * \brief Generate the text for this plugin.
  */
 function Output()
 {
     global $PG_CONN;
     if ($this->State != PLUGIN_STATE_READY) {
         return;
     }
     $V = "";
     /* If this is a POST, then process the request. */
     $Group = GetParm('groupname', PARM_TEXT);
     if (!empty($Group)) {
         $rc = $this->Add($Group);
         if (empty($rc)) {
             /* Need to refresh the screen */
             $text = _("Group");
             $text1 = _("added");
             $V .= displayMessage("{$text} {$Group} {$text1}.");
         } else {
             $V .= displayMessage($rc);
         }
     }
     /* Build HTML form */
     $text = _("Add a Group");
     $V .= "<h4>{$text}</h4>\n";
     $V .= "<form name='formy' method='POST' action=" . Traceback_uri() . "?mod=group_add>\n";
     $Val = htmlentities(GetParm('groupname', PARM_TEXT), ENT_QUOTES);
     $text = _("Enter the groupname:");
     $V .= "{$text}\n";
     $V .= "<input type='text' value='{$Val}' name='groupname' size=20>\n";
     $text = _("Add");
     $V .= "<input type='submit' value='{$text}'>\n";
     $V .= "</form>\n";
     if (!$this->OutputToStdout) {
         return $V;
     }
     print "{$V}";
     return;
 }
 function Output()
 {
     global $PG_CONN;
     if ($this->State != PLUGIN_STATE_READY) {
         return;
     }
     $V = "";
     $folder_pk = GetParm('folder', PARM_TEXT);
     $FolderSelectId = GetParm('selectfolderid', PARM_INTEGER);
     if (empty($FolderSelectId)) {
         $FolderSelectId = GetUserRootFolder();
     }
     $NewName = GetArrayVal("newname", $_POST);
     $NewDesc = GetArrayVal("newdesc", $_POST);
     $upload_pk = GetArrayVal("upload_pk", $_POST);
     if (empty($upload_pk)) {
         $upload_pk = GetParm('upload', PARM_INTEGER);
     }
     /* Check Upload permission */
     if (!empty($upload_pk)) {
         $UploadPerm = GetUploadPerm($upload_pk);
         if ($UploadPerm < PERM_WRITE) {
             $text = _("Permission Denied");
             echo "<h2>{$text}<h2>";
             return;
         }
     }
     $rc = $this->UpdateUploadProperties($upload_pk, $NewName, $NewDesc);
     if ($rc == 0) {
         $text = _("Nothing to Change");
         $V .= displayMessage($text);
     } else {
         if ($rc == 1) {
             $text = _("Upload Properties successfully changed");
             $V .= displayMessage($text);
         }
     }
     /* define js_url */
     $V .= js_url();
     /* Build the HTML form */
     $V .= "<form name='formy' method='post'>\n";
     // no url = this url
     $V .= "<ol>\n";
     $text = _("Select the folder that contains the upload:  \n");
     $V .= "<li>{$text}";
     /*** Display folder select list, on change request new page with folder= in url ***/
     $Uri = Traceback_uri() . "?mod=" . $this->Name . "&selectfolderid=";
     $V .= "<select name='oldfolderid' onChange='window.location.href=\"{$Uri}\" + this.value'>\n";
     $V .= FolderListOption(-1, 0, 1, $FolderSelectId);
     $V .= "</select><P />\n";
     /*** Display upload select list, on change, request new page with new upload= in url ***/
     $text = _("Select the upload you wish to edit:  \n");
     $V .= "<li>{$text}";
     // Get list of all upload records in this folder
     $UploadList = FolderListUploads_perm($FolderSelectId, PERM_WRITE);
     // Make data array for upload select list.  Key is upload_pk, value is a composite
     // of the upload_filename and upload_ts.
     $UploadArray = array();
     foreach ($UploadList as $UploadRec) {
         $SelectText = htmlentities($UploadRec['name']);
         if (!empty($UploadRec['upload_ts'])) {
             $SelectText .= ", " . substr($UploadRec['upload_ts'], 0, 19);
         }
         $UploadArray[$UploadRec['upload_pk']] = $SelectText;
     }
     /* Get selected upload info to display*/
     if (empty($upload_pk)) {
         // no upload selected, so use the top one in the select list
         reset($UploadArray);
         $upload_pk = key($UploadArray);
     }
     if ($upload_pk) {
         // case where upload is set in the URL
         $sql = "SELECT * FROM upload WHERE upload_pk = '{$upload_pk}'";
         $result = pg_query($PG_CONN, $sql);
         DBCheckResult($result, $sql, __FILE__, __LINE__);
         if (pg_num_rows($result) == 0) {
             /* Bad upload_pk */
             $text = _("Missing upload.");
             $V .= displayMessage($text);
             pg_free_result($result);
             return 0;
         }
         $UploadRec = pg_fetch_assoc($result);
         pg_free_result($result);
         $V .= "<INPUT type='hidden' name='upload_pk' value='{$upload_pk}' />\n";
     } else {
         // no uploads in the folder
         $UploadRec = array();
     }
     $url = Traceback_uri() . "?mod=upload_properties&folder={$folder_pk}&upload=";
     $onchange = "onchange=\"js_url(this.value, '{$url}')\"";
     $V .= Array2SingleSelect($UploadArray, "uploadselect", $upload_pk, false, false, $onchange);
     /* Input upload_filename */
     $text = _("Upload name:  \n");
     $V .= "<li>{$text}";
     if (empty($UploadRec['upload_filename'])) {
         $upload_filename = "";
     } else {
         $upload_filename = htmlentities($UploadRec['upload_filename']);
     }
     $V .= "<INPUT type='text' name='newname' size=40 value='{$upload_filename}' />\n";
     /* Input upload_desc */
     $text = _("Upload description:  \n");
     $V .= "<li>{$text}";
     if (empty($UploadRec['upload_desc'])) {
         $upload_desc = "";
     } else {
         $upload_desc = htmlentities($UploadRec['upload_desc'], ENT_QUOTES);
     }
     $V .= "<INPUT type='text' name='newdesc' size=60 value='{$upload_desc}' />\n";
     $V .= "</ol>\n";
     $text = _("Edit");
     $V .= "<input type='submit' value='{$text}!'>\n";
     $V .= "</form>\n";
     if (!$this->OutputToStdout) {
         return $V;
     }
     print "{$V}";
     return;
 }
Example #11
0
  background-color: #eee;
}
#messageBox h1 {
  margin-top: 0;
  color: #333;
}
</style>
<body>
<div id="maincontainer">
  <?php 
page_header();
?>

  <div id="pagecontent">
    <?php 
displayMessage('LoginMessage', 'LoginDetails', 'LoginType');
?>
 

    <div id="loginContainer">
      <div id="messageBox">
        <h1><?php 
echo _("Welcome to LACTOR");
?>
</h1>
        <?php 
echo _("LACTOR is an innovative, interactive web-based breastfeeding monitoring system.  LACTOR was created to help breastfeeding mothers monitor their breastfeeding patterns and detect early breastfeeding problems.  The lactation consultant can also monitor mothers' data and intervene immediately in case of a breastfeeding problem.  Mothers also receive notifications if they have any breastfeeding problem with suggestions to help solve the problem.");
?>
 
      </div>
      <div id="loginBox" class="tabs">
function showError($msg = "ERROR")
{
    displayMessage($msg, 31);
}
}
.nowrap {
  white-space: nowrap;
}
</style>
</head>

<body>
<div id="maincontainer">
<?php 
page_header();
?>

<div id="pagecontent">
<?php 
displayMessage('PerMessage', 'PerDetails', 'PerType');
?>
 

<p><?php 
echo _("Please fill out all the fields.");
?>
</p>

<div id="container">
<ul class="menu">
<li id="breastfeeding" class="active"><?php 
echo _("Breastfeeding follow-up");
?>
</li>
</ul>
Example #14
0
 /**
  * \brief Generate the view contents in HTML and sends it
  *  to stdout.
  *
  * \param $Name - the name for this plugin.
  * 
  * \note This function is intended to be called from other plugins.
  */
 function ShowView($Fin = NULL, $BackMod = "browse", $ShowMenu = 1, $ShowHeader = 1, $ShowText = NULL, $ViewOnly = False, $DispView = True)
 {
     if ($this->State != PLUGIN_STATE_READY) {
         return;
     }
     $V = "";
     global $Plugins;
     $Upload = GetParm("upload", PARM_INTEGER);
     if (!empty($Upload)) {
         $UploadPerm = GetUploadPerm($Upload);
         if ($UploadPerm < PERM_READ) {
             return;
         }
     }
     $Folder = GetParm("folder", PARM_INTEGER);
     $Show = GetParm("show", PARM_STRING);
     $Item = GetParm("item", PARM_INTEGER);
     $nomosagent_pk = GetParm("napk", PARM_INTEGER);
     $Page = GetParm("page", PARM_INTEGER);
     $bucketagent_pk = GetParm("bapk", PARM_INTEGER);
     if (!$Fin && (empty($Item) || empty($Upload))) {
         return;
     }
     if (empty($Page)) {
         $Page = 0;
     }
     /* Get uploadtree table name */
     $uploadtree_tablename = "uploadtree";
     if (!empty($Upload)) {
         $uploadtree_tablename = GetUploadtreeTablename($Upload);
     }
     switch (GetParm("format", PARM_STRING)) {
         case 'hex':
             $Format = 'hex';
             break;
         case 'text':
             $Format = 'text';
             break;
         case 'flow':
             $Format = 'flow';
             break;
         default:
             /* Determine default show based on mime type */
             if (empty($Item)) {
                 $Format = 'text';
             } else {
                 $Meta = GetMimeType($Item);
                 list($Type, $Junk) = explode("/", $Meta, 2);
                 if ($Type == 'text') {
                     $Format = 'flow';
                 } else {
                     switch ($Meta) {
                         case "application/octet-string":
                         case "application/x-awk":
                         case "application/x-csh":
                         case "application/x-javascript":
                         case "application/x-perl":
                         case "application/x-shellscript":
                         case "application/x-rpm-spec":
                         case "application/xml":
                         case "message/rfc822":
                             $Format = 'flow';
                             break;
                         default:
                             $Format = 'flow';
                     }
                 }
             }
             break;
     }
     /**********************************
        Display micro header
        **********************************/
     if ($ShowHeader) {
         $Uri = Traceback_uri() . "?mod=browse";
         $Opt = "";
         if (!empty($Item)) {
             $Opt .= "&item={$Item}";
         }
         if (!empty($Upload)) {
             $Opt .= "&upload={$Upload}";
         }
         if (!empty($Folder)) {
             $Opt .= "&folder={$Folder}";
         }
         if (!empty($Show)) {
             $Opt .= "&show={$Show}";
         }
         /* No item */
         $V .= Dir2Browse($BackMod, $Item, NULL, 1, "View", -1, '', '', $uploadtree_tablename) . "<P />\n";
     }
     // if ShowHeader
     $this->SortHighlightMenu();
     /***********************************
        Display file contents
        ***********************************/
     print $V;
     $V = "";
     $openedFin = False;
     if (empty($Fin)) {
         $Fin = @fopen(RepPathItem($Item), "rb");
         if ($Fin) {
             $openedFin = true;
         }
         if (empty($Fin)) {
             /* Added by vincent implement when view files which not in repository, ask user if want to reunpack*/
             /** BEGIN **/
             /* If this is a POST, then process the request. */
             $uploadunpack = GetParm('uploadunpack', PARM_INTEGER);
             $uploadpk = $Upload;
             $flag = 0;
             $P =& $Plugins[plugin_find_id("ui_reunpack")];
             $state = $P->CheckStatus($uploadpk, "reunpack", "ununpack");
             //print "<p>$state</p>";
             if ($state == 0 || $state == 2) {
                 if (!empty($uploadunpack)) {
                     $rc = $P->AgentAdd($uploadpk);
                     if (empty($rc)) {
                         /* Need to refresh the screen */
                         $text = _("Unpack added to job queue");
                         $V .= displayMessage($text);
                         $flag = 1;
                         $text = _("Reunpack job is running: you can see it in");
                         $text1 = _("jobqueue");
                         print "<p> <font color=red>{$text} <a href='" . Traceback_uri() . "?mod=showjobs'>{$text1}</a></font></p>";
                     } else {
                         $text = _("Unpack of Upload failed");
                         $V .= displayMessage("{$text}: {$rc}");
                     }
                     print $V;
                 }
             } else {
                 $flag = 1;
                 $text = _("Reunpack job is running: you can see it in");
                 $text1 = _("jobqueue");
                 print "<p> <font color=red>{$text} <a href='" . Traceback_uri() . "?mod=showjobs'>{$text1}</a></font></p>";
             }
             $text = _("File contents are not available in the repository.");
             print "{$text}\n";
             $P =& $Plugins[plugin_find_id("ui_reunpack")];
             print $P->ShowReunpackView($Item, $flag);
             return;
         }
         /** END **/
     }
     rewind($Fin);
     $Pages = "";
     $Uri = preg_replace('/&page=[0-9]*/', '', Traceback());
     $HighlightMenu = "";
     $HighlightMenu .= "</center>";
     // some fcn left a dangling center
     if ($Format == 'hex') {
         $HighlightMenu .= $this->GetHighlightMenu(VIEW_BLOCK_HEX, $ViewOnly, $DispView);
         if (!empty($HighlightMenu)) {
             print "<center>{$HighlightMenu}</center><hr>\n";
         }
         $PageMenu = $this->GetFileJumpMenu($Fin, $Page, VIEW_BLOCK_HEX, $Uri);
         $PageSize = VIEW_BLOCK_HEX * $Page;
         if (!empty($PageMenu)) {
             print "<center>{$PageMenu}</center><br>\n";
         }
         $this->ShowHex($Fin, $PageSize, VIEW_BLOCK_HEX);
         if (!empty($PageMenu)) {
             print "<P /><center>{$PageMenu}</center><br>\n";
         }
     } else {
         if ($Format == 'text') {
             $HighlightMenu .= $this->GetHighlightMenu(VIEW_BLOCK_TEXT, $ViewOnly, $DispView);
             if (!empty($HighlightMenu)) {
                 print "<center>{$HighlightMenu}</center><hr>\n";
             }
             $PageMenu = $this->GetFileJumpMenu($Fin, $Page, VIEW_BLOCK_TEXT, $Uri);
             $PageSize = VIEW_BLOCK_TEXT * $Page;
             if (!empty($PageMenu)) {
                 print "<center>{$PageMenu}</center><br>\n";
             }
             $this->ShowText($Fin, $PageSize, 0, VIEW_BLOCK_TEXT);
             if (!empty($PageMenu)) {
                 print "<P /><center>{$PageMenu}</center><br>\n";
             }
         } else {
             if ($Format == 'flow') {
                 $HighlightMenu .= $this->GetHighlightMenu(VIEW_BLOCK_TEXT, $ViewOnly, $DispView);
                 if (!empty($HighlightMenu)) {
                     print "<center>{$HighlightMenu}</center><hr>\n";
                 }
                 $PageMenu = $this->GetFileJumpMenu($Fin, $Page, VIEW_BLOCK_TEXT, $Uri);
                 $PageSize = VIEW_BLOCK_TEXT * $Page;
                 if (!empty($PageMenu)) {
                     print "<center>{$PageMenu}</center><br>\n";
                 }
                 if (!empty($ShowText)) {
                     echo $ShowText, "<hr>";
                 }
                 $this->ShowText($Fin, $PageSize, 1, VIEW_BLOCK_TEXT);
                 if (!empty($PageMenu)) {
                     print "<P /><center>{$PageMenu}</center><br>\n";
                 }
             }
         }
     }
     if ($openedFin) {
         fclose($Fin);
     }
     return;
 }
Example #15
0
    /**
     * Coloca la parte SUperior de la Interfaz
     */
    private function Superior($extra = "")
    {
        global $APP_TITULO;
        global $RUTA_R;
        if ($this->seleccionmenu == true) {
            $this->Mn = new Menu();
            $this->Mn->Busca_Menu();
        }
        $dir_inicial = $RUTA_R . "inicial.php";
        $dir_admin = $RUTA_R . "admin/index.php";
        $dir_report = $RUTA_R . "reportes/index.php";
        $dir_reportes = $RUTA_R . "reportes/reporte.php";
        $dir_actual = $_SERVER['REQUEST_URI'];
        if ($dir_inicial == $dir_actual) {
            include "./lib/php/messageResources.php";
        } elseif ($dir_admin == $dir_actual) {
            include "../lib/php/messageResources.php";
        } elseif ($dir_report == $dir_actual) {
            include "./../lib/php/messageResources.php";
        } elseif (substr_count($dir_actual, $dir_reportes) > 0) {
            include "../lib/php/messageResources.php";
        } else {
            include "../../lib/php/messageResources.php";
        }
        global $INDEXIDIOMA;
        global $LABELINDEX;
        ?>
		
 		<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
			<html lang="es-MX">
				<head>
					<meta http-equiv="X-UA-Compatible" content="IE=8" />
					<meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1">
					<meta http-equiv="cache-control" content="no-cache">
					<meta http-equiv="Pragma" content="no-cache">					
					<meta http-equiv="expires" content="0">								
					<title><?php 
        echo $LABELINDEX[$INDEXIDIOMA][408];
        ?>
</title>
					<link   rel="stylesheet" type="text/css" media="all" href="<?php 
        echo $RUTA_R;
        ?>
lib/js/jscalendar-1.0/calendar-blue2.css" title="win2k-cold-1" />	
					<script type="text/javascript" src="<?php 
        echo $RUTA_R;
        ?>
lib/js/jscalendar-1.0/calendar.js"></script>			
					<script type="text/javascript" src="<?php 
        echo $RUTA_R;
        ?>
lib/js/jscalendar-1.0/lang/calendar-es.js"></script>
					<script type="text/javascript" src="<?php 
        echo $RUTA_R;
        ?>
lib/js/jscalendar-1.0/calendar-setup.js"></script>
					<script type="text/javascript" src="<?php 
        echo $RUTA_R;
        ?>
lib/js/swfobject/swfobject.js"></script>
					<link   type="text/css" rel="stylesheet" href="<?php 
        echo $RUTA_R;
        ?>
css/estilo.css">
					<link   type="text/css" rel="stylesheet" href="<?php 
        echo $RUTA_R;
        ?>
css/estilo_lista.css">
					<script type="text/javascript" src="<?php 
        echo $RUTA_R;
        ?>
lib/js/jquery/jquery-1.3.2.js"></script>
					<script type="text/javascript" src="<?php 
        echo $RUTA_R;
        ?>
lib/js/bloqueaRetroceso.js"></script>
				</head>				
				<body <?php 
        echo $extra;
        ?>
>							
					<div align="center" style="background: #a2a996; padding-top: 10px; min-height: 550px;" id="Interfaz">
						<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="89%" height="90%">
							<tbody valign="top">
								<tr>
									<td colspan="2" valign="top" height="40px">
										<table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-left: 30px; padding-right: 30px;">
											<tr>
												<td width="45%" valign="top" style="border: 0px solid;">
													<br />
													<img src="<?php 
        echo $RUTA_R;
        ?>
images/logopng.png" border="0" >
													<br />
													<span style="text-transform: capitalize; font-size: 18px; color: #000; font-variant: small-caps; font-family: sans-serif; font-weight: bold;" >&nbsp; <?php 
        echo $LABELINDEX[$INDEXIDIOMA][408];
        ?>
</span> </td>
												<td width="50%" align="right" style="padding-right: 40">
													<table cellpadding="2" cellspacing="2">
														<tr>															
															<td>
															<?php 
        if ($this->seleccionmenu == true) {
            ?>
																<table>
																	<tr>
																		<td><strong><?php 
            echo $LABELINDEX[$INDEXIDIOMA][0];
            ?>
:</strong>&nbsp;&nbsp;</td>
																		<td><?php 
            echo $_SESSION["usuario"];
            ?>
</td>
																	</tr>																	
																	<tr>
																		<td><strong><?php 
            echo $LABELINDEX[$INDEXIDIOMA][58];
            ?>
:</strong>&nbsp;&nbsp;</td>
																		<td><?php 
            echo $_SESSION["nombreempresa"];
            ?>
</td>
																	</tr>																	
																	<tr>
																		<td colspan='2'><strong><a href="<?php 
            echo $RUTA_R;
            ?>
tuto/BELCORP_MANUAL_USUARIO_Expenses.pdf" target="_blank"><?php 
            echo $LABELINDEX[$INDEXIDIOMA][5];
            ?>
</a></strong>&nbsp;&nbsp;</td>
																	</tr>                                                                
																</table>																	
															<?php 
        }
        ?>
															</td>
															<td><img src="<?php 
        echo $RUTA_R;
        ?>
images/logoExpenses.png" ></td>
														</tr>
													</table>
												</td>
											</tr>
										</table>
									</td>
								</tr>		
								<tr>									
									<td valign="top" width="93%"> 								
										<table width="100%"  border="0" cellspacing="0" cellpadding="0"  >											
											<tr>
												<td align="center" valign="top">
													<?php 
        if ($this->seleccionmenu == true) {
            $this->Mn->Imprime_Papas();
        }
        ?>
												</td>
											</tr>											
										</table>										
										<table width="100%" cellpadding="0" cellspacing="0" style="padding-left: 10px; padding-right: 10px;">										
											<tr>
											<td valign="top">										
										<table width="100%" border="0" cellspacing="0" cellpadding="0" class="inicio">										
											<tr>
												<td>
													<?php 
        if (isset($_GET['loginErr'])) {
            echo displayMessage($FWK_MSG_LOGINERROR, $FWK_MSG_ERROR);
        }
        ?>
													<?php 
        if (isset($_GET['notLogged'])) {
            echo displayMessage($FWK_MSG_NOTLOGGED, $FWK_MSG_WARN);
        }
        ?>
													<?php 
        if (isset($_GET['errormsg'])) {
            echo displayMessage(base64_decode($_GET['errormsg']), $FWK_MSG_ERROR);
        }
        ?>
												</td>
											</tr>										
											<tr>
												<td   valign="top">              								
 		<?php 
    }
Example #16
0
function drawPageTitle($title, $message = null, $message_type = '')
{
    echo '<div class="HeaderPageTitle">' . $title . '</div>';
    echo '<div class="Content">';
    if ($message != null) {
        if ($message_type == '') {
            $message_type = 'error';
        }
        if (strtolower($message_type) == 'error') {
            displayErrors($message);
        } elseif (strtolower($message_type) == 'system') {
            displayMessage($message);
        } elseif (strtolower($message_type) == 'tip') {
            displayTip($message);
        } else {
            displayInfo($message);
        }
    }
}
Example #17
0
 /**
  * \brief Generate the text for this plugin.
  */
 function Output()
 {
     if ($this->State != PLUGIN_STATE_READY) {
         return;
     }
     $V = "";
     switch ($this->OutputType) {
         case "XML":
             break;
         case "HTML":
             /* If this is a POST, then process the request. */
             $Folder = GetParm('folder', PARM_INTEGER);
             if (empty($Folder)) {
                 $Folder = FolderGetTop();
             }
             $uploadpk = GetParm('upload', PARM_INTEGER);
             if (array_key_exists('agents', $_REQUEST)) {
                 $agents = $_POST['agents'];
             } else {
                 $agents = '';
             }
             if (!empty($uploadpk) && !empty($agents) && is_array($agents)) {
                 $rc = $this->AgentsAdd($uploadpk, $agents);
                 if (empty($rc)) {
                     $URL = Traceback_uri() . "?mod=showjobs&upload={$uploadpk} ";
                     /* Need to refresh the screen */
                     $text = _("Your jobs have been added to job queue.");
                     $LinkText = _("View Jobs");
                     $msg = "{$text} <a href={$URL}>{$LinkText}</a>";
                     $V .= displayMessage($msg);
                 } else {
                     $text = _("Scheduling of Agent(s) failed: ");
                     $V .= displayMessage($text . $rc);
                 }
             }
             /**
              * Create the AJAX (Active HTTP) javascript for doing the reply
              * and showing the response. 
              */
             $V .= ActiveHTTPscript("Uploads");
             $V .= "<script language='javascript'>\n";
             $V .= "function Uploads_Reply()\n";
             $V .= "  {\n";
             $V .= "  if ((Uploads.readyState==4) && (Uploads.status==200))\n";
             $V .= "    {\n";
             /* Remove all options */
             $V .= "    document.getElementById('uploaddiv').innerHTML = '<select size=\\'10\\' name=\\'upload\\' onChange=\\'Agents_Get(\"" . Traceback_uri() . "?mod=upload_agent_options&upload=\" + this.value)\\'>' + Uploads.responseText + '</select><P />';\n";
             //$V .= "alert(document.getElementById('uploaddiv').innerHTML)\n";
             $V .= "    document.getElementById('agentsdiv').innerHTML = '';\n";
             /* Add new options */
             $V .= "    }\n";
             $V .= "  }\n";
             $V .= "</script>\n";
             $V .= ActiveHTTPscript("Agents");
             $V .= "<script language='javascript'>\n";
             $V .= "function Agents_Reply()\n";
             $V .= "  {\n";
             $V .= "  if ((Agents.readyState==4) && (Agents.status==200))\n";
             $V .= "    {\n";
             /* Remove all options */
             $V .= "    document.getElementById('agentsdiv').innerHTML = '<select multiple size=\\'10\\' id=\\'agents\\' name=\\'agents[]\\'>' + Agents.responseText + '</select>';\n";
             /* Add new options */
             $V .= "    }\n";
             $V .= "  }\n";
             $V .= "</script>\n";
             /*************************************************************/
             /* Display the form */
             $V .= "<form name='formy' method='post'>\n";
             // no url = this url
             $V .= _("Select an uploaded file for additional analysis.\n");
             $V .= "<ol>\n";
             $text = _("Select the folder containing the upload you wish to analyze:");
             $V .= "<li>{$text}<br>\n";
             $V .= "<select name='folder'\n";
             $V .= "onLoad='Uploads_Get((\"" . Traceback_uri() . "?mod=upload_options&folder={$Folder}' ";
             $V .= "onChange='Uploads_Get(\"" . Traceback_uri() . "?mod=upload_options&folder=\" + this.value)'>\n";
             $V .= FolderListOption(-1, 0, 1, $Folder);
             $V .= "</select><P />\n";
             $text = _("Select the upload to analyze:");
             $V .= "<li>{$text}<br>";
             $V .= "<div id='uploaddiv'>\n";
             $V .= "<select size='10' name='upload' onChange='Agents_Get(\"" . Traceback_uri() . "?mod=upload_agent_options&upload=\" + this.value)'>\n";
             $List = FolderListUploads_perm($Folder, PERM_WRITE);
             foreach ($List as $L) {
                 $V .= "<option value='" . $L['upload_pk'] . "'>";
                 $V .= htmlentities($L['name']);
                 if (!empty($L['upload_desc'])) {
                     $V .= " (" . htmlentities($L['upload_desc']) . ")";
                 }
                 $V .= "</option>\n";
             }
             $V .= "</select><P />\n";
             $V .= "</div>\n";
             $text = _("Select additional analysis.");
             $V .= "<li>{$text}<br>\n";
             $V .= "<div id='agentsdiv'>\n";
             $V .= "<select multiple size='10' id='agents' name='agents[]'></select>\n";
             $V .= "</div>\n";
             $V .= "</ol>\n";
             $text = _("Analyze");
             $V .= "<input type='submit' value='{$text}!'>\n";
             $V .= "</form>\n";
             break;
         case "Text":
             break;
         default:
             break;
     }
     if (!$this->OutputToStdout) {
         return $V;
     }
     print "{$V}";
     return;
 }
Example #18
0
<head>
<?php 
head_tag("Admin LACTOR - " . _("Reset Password"));
?>
<link rel="stylesheet" href="css/base.css" type="text/css" media="all" />
</head>

<body>
<div id="maincontainer">
<?php 
page_header();
?>

<div id="pagecontent">
<?php 
displayMessage('ResetMessage', 'ResetDetails', 'ResetType');
?>
 

  <div id="container">
    <div class="tabs">
      <ul class="menu">
        <li class="active"><a href="#reset"><?php 
echo _("Reset Password");
?>
</a></li>
      </ul>
      <div class="content breastfeeding" style="padding:1em;">
      <h1><img src="image/reset.gif" alt =""/> <?php 
echo _("Enter your email address");
?>
Example #19
0
			<?php 
if (!isLoggedIn()) {
    ?>
            	<li><a href="register.php">Create An Account</a></li>
			<?php 
} else {
    ?>
            	<li><a href="create.php">Create Topic</a></li>
			<?php 
}
?>
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </div>

    <div class="container">
		<div class="row">
			<div class="col-md-8">
				<div class="main-col">
					<div class="block">
						<h1 class="pull-left"><?php 
echo $title;
?>
</h1>
						<h4 class="pull-right">A simple PHP forum engine</h4>
						<div class="clearfix"></div>
						<hr>
						<?php 
echo displayMessage();
 /**
  * \brief Generate the text for this plugin.
  */
 function Output()
 {
     if ($this->State != PLUGIN_STATE_READY) {
         return;
     }
     $V = "";
     global $PG_CONN;
     switch ($this->OutputType) {
         case "XML":
             break;
         case "HTML":
             /* If this is a POST, then process the request. */
             $FolderSelectId = GetParm('selectfolderid', PARM_INTEGER);
             if (empty($FolderSelectId)) {
                 $FolderSelectId = FolderGetTop();
             }
             $FolderId = GetParm('oldfolderid', PARM_INTEGER);
             $NewName = GetParm('newname', PARM_TEXT);
             $NewDesc = GetParm('newdesc', PARM_TEXT);
             if (!empty($FolderId)) {
                 $FolderSelectId = $FolderId;
                 $rc = $this->Edit($FolderId, $NewName, $NewDesc);
                 if ($rc == 1) {
                     /* Need to refresh the screen */
                     $text = _("Folder Properties changed");
                     $V .= displayMessage($text);
                 }
             }
             $V .= _("<p>The folder properties that can be changed are the folder name and\n     description.  First select the folder to edit. Then enter the new values.\n     If no value is entered, then the corresponding field will not be changed.</p>");
             /* Get the folder info */
             $sql = "SELECT * FROM folder WHERE folder_pk = '{$FolderSelectId}';";
             $result = pg_query($PG_CONN, $sql);
             DBCheckResult($result, $sql, __FILE__, __LINE__);
             $Folder = pg_fetch_assoc($result);
             pg_free_result($result);
             /* Display the form */
             $V .= "<form method='post'>\n";
             // no url = this url
             $V .= "<ol>\n";
             $text = _("Select the folder to edit:  \n");
             $V .= "<li>{$text}";
             $Uri = Traceback_uri() . "?mod=" . $this->Name . "&selectfolderid=";
             $V .= "<select name='oldfolderid' onChange='window.location.href=\"{$Uri}\" + this.value'>\n";
             $V .= FolderListOption(-1, 0, 1, $FolderSelectId);
             $V .= "</select><P />\n";
             $text = _("Change folder name:  \n");
             $V .= "<li>{$text}";
             $V .= "<INPUT type='text' name='newname' size=40 value=\"" . htmlentities($Folder['folder_name'], ENT_COMPAT) . "\" />\n";
             $text = _("Change folder description:  \n");
             $V .= "<P /><li>{$text}";
             $V .= "<INPUT type='text' name='newdesc' size=60 value=\"" . htmlentities($Folder['folder_desc'], ENT_COMPAT) . "\" />\n";
             $V .= "</ol>\n";
             $text = _("Edit");
             $V .= "<input type='submit' value='{$text}!'>\n";
             $V .= "</form>\n";
             break;
         case "Text":
             break;
         default:
             break;
     }
     if (!$this->OutputToStdout) {
         return $V;
     }
     print "{$V}";
     return;
 }
Example #21
0
$query = "SELECT email FROM Mothers m LEFT JOIN InfantProfile i ON m.mid = i.mid WHERE i.mid IS NULL;";
$result = mysql_query($query);
$needInfoEmails = array();
if (mysql_num_rows($result)) {
    while ($row = mysql_fetch_array($result)) {
        array_push($needInfoEmails, $row['email']);
    }
    if (count($needInfoEmails)) {
        $childMessage = "The following mother(s) need their child information entered: ";
        $childType = 2;
        $mothers = getMotherInfo($needInfoEmails);
        $childDetails = "";
        foreach ($mothers as $mother) {
            $childDetails .= sprintf("%s (%s)<br />", $mother['Name'], $mother['email']);
        }
        displayMessage($childMessage, $childDetails, $childType);
    }
}
?>
 

<div id="registercontent">

  <div id="container">
  <div class='tabs'>
    <ul class="menu"><!-- Each item is a tab -->
      <li><a href='#manage'><?php 
echo _("Add/Manage Users");
?>
</a></li>
      <li><a href='#proxy'><?php 
h3 {
  text-decoration: underline;
}
</style>
</head>

<body>
<div id="maincontainer">
<?php 
page_header();
?>

<div id="pagecontent">
<?php 
displayMessage('ErrorMessage', '', 'ErrorType');
?>
 

<div id="container">
<span class="clear"></span>
<div class="content breastfeeding" width="500px">
<div id="standardinput">
<h2 style='text-align: center'><?php 
echo _("Informed Consent (For Mothers)<br>Graceland University School of Nursing");
?>
</h2>
<p style='text-align: center'>

<h3>What is the purpose of this study?</h3>
<p>The purpose of this study is to explore the lactation consultants&rsquo; perceptions and experiences with the interactive web-based breastfeeding monitoring system (LACTOR). To help mothers breastfeed longer without giving food other than breast milk, our research team developed an interactive online breastfeeding monitoring system where the mothers could enter their breastfeeding data and a lactation consultant monitor their data and intervene in case of breastfeeding problems. The goal was to keep the mothers and lacation consultants (LC) connected and detect early breasfeeding problems. The system was tested among mothers and proved to be useful in improving breastfeeding outcomes.</p>
Example #23
0
function displayScouts(&$db, &$messageBox, &$player, $read, $group)
{
    if ($group) {
        //here we group new messages
        $query = 'SELECT alignment, player_id, sender_id, player_name AS sender, count( message_id ) AS number, min( send_time ) as first, max( send_time) as last, msg_read
					FROM message
					JOIN player ON player.account_id = message.sender_id AND message.game_id = player.game_id
					WHERE message.account_id = ' . $db->escapeNumber($player->getAccountID()) . '
					AND player.game_id = ' . $db->escapeNumber($player->getGameID()) . '
					AND message_type_id = ' . $db->escapeNumber(MSG_SCOUT) . '
					AND receiver_delete = ' . $db->escapeBoolean(false) . '
					AND msg_read = ' . $db->escapeBoolean($read) . '
					GROUP BY sender_id, msg_read
					ORDER BY send_time DESC';
        $db->query($query);
        while ($db->nextRecord()) {
            //display grouped stuff (allow for deletion)
            $playerName = get_alignment_text($db->getField('alignment'), stripslashes($db->getField('sender')) . ' (' . $db->getField('player_id') . ')');
            $message = 'Your forces have spotted ' . $playerName . ' passing your forces ' . $db->getField('number') . ' times.';
            displayGrouped($messageBox, $playerName, $db->getField('player_id'), $db->getField('sender_id'), $message, $db->getField('first'), $db->getField('last'), $db->getField('msg_read') == 'FALSE');
        }
    } else {
        //not enough to group, display separately
        $query = 'SELECT message_id, account_id, sender_id, message_text, send_time, msg_read
					FROM message
					WHERE account_id = ' . $db->escapeNumber($player->getAccountID()) . '
					AND game_id = ' . $db->escapeNumber($player->getGameID()) . '
					AND message_type_id = ' . $db->escapeNumber(MSG_SCOUT) . '
					AND receiver_delete = ' . $db->escapeBoolean(false) . '
					AND msg_read = ' . $db->escapeBoolean($read) . '
					ORDER BY send_time DESC';
        $db->query($query);
        while ($db->nextRecord()) {
            displayMessage($messageBox, $db->getField('message_id'), $db->getField('account_id'), $db->getField('sender_id'), stripslashes($db->getField('message_text')), $db->getField('send_time'), $db->getField('msg_read'), MSG_SCOUT);
        }
    }
}
Example #24
0
 /**
  * \brief This function is called when user output is
  * requested.  This function is responsible for content.
  * (OutputOpen and Output are separated so one plugin
  * can call another plugin's Output.)
  * This uses $OutputType.
  * The $ToStdout flag is "1" if output should go to stdout, and
  * 0 if it should be returned as a string.  (Strings may be parsed
  * and used by other plugins.)
  */
 function Output()
 {
     if ($this->State != PLUGIN_STATE_READY) {
         return;
     }
     $V = "";
     $action = GetParm('action', PARM_TEXT);
     switch ($this->OutputType) {
         case "XML":
             break;
         case "HTML":
             if ($action == 'add') {
                 $rc = $this->CreateTag(NULL);
                 if (!empty($rc)) {
                     $text = _("Create Tag Failed");
                     $V .= displayMessage("{$text}: {$rc}");
                 } else {
                     $text = _("Create Tag Successful!");
                     $V .= displayMessage($text);
                 }
             }
             if ($action == 'update') {
                 $rc = $this->EditTag();
                 if (!empty($rc)) {
                     $text = _("Edit Tag Failed");
                     $V .= displayMessage("{$text}: {$rc}");
                 } else {
                     $text = _("Edit Tag Successful!");
                     $V .= displayMessage($text);
                 }
             }
             if ($action == 'delete') {
                 $rc = $this->DeleteTag();
                 if (!empty($rc)) {
                     $text = _("Delete Tag Failed");
                     $V .= displayMessage("{$text}: {$rc}");
                 } else {
                     $text = _("Delete Tag Successful!");
                     $V .= displayMessage($text);
                 }
             }
             $V .= $this->ShowTaggingPage(1, 1, $action);
             break;
         case "Text":
             break;
         default:
             break;
     }
     if (!$this->OutputToStdout) {
         return $V;
     }
     print "{$V}";
     return;
 }
  	<td><input type="password" name="pass2" class="style3" size="10"
	  value="<?php 
//get password
if (isset($_POST['btnget']) && $_POST['regno'] != "SELECT") {
    echo $getpass;
}
?>
" /> 
   <input type="submit" name="btnupdatepass" value="Change Password" class="style3" 
	  onclick="return emptyField(),errorPass()"/></td>
  	</tr>
	</table>
	</form>
	<br />
	<?php 
displayMessage();
?>
	<a href="lecturer.php">View Lecturer Details</a><br /><br />
	<a href="home.php"><img src="../Images/home.png" alt="Go Back To Home" /></a>
</div>

<br /><br /><br /><br />
<marquee>
     <p class="style2">::Designed and
       Developed by Udara Senanayake::        </p>
</marquee>



</body>
</html>
Example #26
0
<head>
<?php 
head_tag("LACTOR - " . _("Mother Information"));
?>
</head>


<body>
<div id="maincontainer">
<?php 
page_header();
?>

<div id="pagecontent">
<?php 
displayMessage('InfoMessage', 'InfoDetails', 'InfoType');
?>
 
<?php 
if (!isset($_SESSION['InfoInput'][0])) {
    $_SESSION['InfoInput'][0] = "";
    $_SESSION['InfoInput'][1] = "";
    $_SESSION['InfoInput'][2] = "";
    $_SESSION['InfoInput'][3] = 0;
    $_SESSION['InfoInput'][4] = 0;
    $_SESSION['InfoInput'][5] = 0;
    $_SESSION['InfoInput'][6] = 0;
    $_SESSION['InfoInput'][7] = 0;
    $_SESSION['InfoInput'][8] = 0;
    $_SESSION['InfoInput'][9] = 0;
    $_SESSION['InfoInput'][10] = 0;
 /**
  * \brief Generate the text for this plugin.
  */
 public function Output()
 {
     $V = "";
     /* If this is a POST, then process the request. */
     $uploadpk = GetParm('upload', PARM_INTEGER);
     if (!empty($uploadpk)) {
         $rc = $this->Delete($uploadpk);
         if (empty($rc)) {
             /* Need to refresh the screen */
             $URL = Traceback_uri() . "?mod=showjobs&upload={$uploadpk} ";
             $LinkText = _("View Jobs");
             $text = _("Deletion added to job queue.");
             $msg = "{$text} <a href={$URL}>{$LinkText}</a>";
             $V .= displayMessage($msg);
         } else {
             $text = _("Deletion Scheduling failed: ");
             $V .= DisplayMessage($text . $rc);
         }
     }
     /* Create the AJAX (Active HTTP) javascript for doing the reply
        and showing the response. */
     $V .= ActiveHTTPscript("Uploads");
     $V .= "<script language='javascript'>\n";
     $V .= "function Uploads_Reply()\n";
     $V .= "  {\n";
     $V .= "  if ((Uploads.readyState==4) && (Uploads.status==200))\n";
     $V .= "    {\n";
     /* Remove all options */
     //$V.= "    document.formy.upload.innerHTML = Uploads.responseText;\n";
     $V .= "    document.getElementById('uploaddiv').innerHTML = '<BR><select name=\\'upload\\' size=\\'10\\'>' + Uploads.responseText + '</select><P />';\n";
     /* Add new options */
     $V .= "    }\n";
     $V .= "  }\n";
     $V .= "</script>\n";
     /* Build HTML form */
     $V .= "<form name='formy' method='post'>\n";
     // no url = this url
     $text = _("Select the uploaded file to");
     $text1 = _("delete");
     $V .= "{$text} <em>{$text1}</em>\n";
     $V .= "<ul>\n";
     $text = _("This will");
     $text1 = _("delete");
     $text2 = _("the upload file!");
     $V .= "<li>{$text} <em>{$text1}</em> {$text2}\n";
     $text = _("Be very careful with your selection since you can delete a lot of work!\n");
     $V .= "<li>{$text}";
     $text = _("All analysis only associated with the deleted upload file will also be deleted.\n");
     $V .= "<li>{$text}";
     $text = _("THERE IS NO UNDELETE. When you select something to delete, it will be removed from the database and file repository.\n");
     $V .= "<li>{$text}";
     $V .= "</ul>\n";
     $text = _("Select the uploaded file to delete:");
     $V .= "<P>{$text}<P>\n";
     $V .= "<ol>\n";
     $text = _("Select the folder containing the file to delete: ");
     $V .= "<li>{$text}";
     $V .= "<select name='folder' ";
     $V .= "onLoad='Uploads_Get((\"" . Traceback_uri() . "?mod=upload_options&folder=-1' ";
     $V .= "onChange='Uploads_Get(\"" . Traceback_uri() . "?mod=upload_options&folder=\" + this.value)'>\n";
     $root_folder_pk = GetUserRootFolder();
     $V .= FolderListOption($root_folder_pk, 0);
     $V .= "</select><P />\n";
     $text = _("Select the uploaded project to delete:");
     $V .= "<li>{$text}";
     $V .= "<div id='uploaddiv'>\n";
     $V .= "<BR><select name='upload' size='10'>\n";
     $List = FolderListUploads_perm($root_folder_pk, Auth::PERM_WRITE);
     foreach ($List as $L) {
         $V .= "<option value='" . $L['upload_pk'] . "'>";
         $V .= htmlentities($L['name']);
         if (!empty($L['upload_desc'])) {
             $V .= " (" . htmlentities($L['upload_desc']) . ")";
         }
         if (!empty($L['upload_ts'])) {
             $V .= " :: " . substr($L['upload_ts'], 0, 19);
         }
         $V .= "</option>\n";
     }
     $V .= "</select><P />\n";
     $V .= "</div>\n";
     $V .= "</ol>\n";
     $text = _("Delete");
     $V .= "<input type='submit' value='{$text}!'>\n";
     $V .= "</form>\n";
     return $V;
 }
 /**
  * \brief output the scheduler admin UI
  **/
 function Output()
 {
     global $Plugins;
     if ($this->State != PLUGIN_STATE_READY) {
         return 0;
     }
     $V = "";
     $status_msg = "";
     switch ($this->OutputType) {
         case "XML":
             break;
         case "HTML":
             $this->operation_array = array("status" => array(_("Status"), _("Display job or scheduler status.")), "database" => array(_("Check job queue"), _("Check for new jobs.")), "reload" => array(_("Reload"), _("Reload fossology.conf.")), "agents" => array(_("Agents"), _("Show a list of enabled agents.")), "verbose" => array(_("Verbose"), _("Change the verbosity level of the scheduler or a job.")), "stop" => array(_("Shutdown Scheduler"), _("Shutdown the scheduler gracefully and stop all background processing.  This can take a while for all the agents to quit.")), "restart" => array(_("Unpause a job"), _("Unpause a job.")), "pause" => array(_("Pause a running job"), _("Pause a running job.")), "priority" => array(_("Priority"), _("Change the priority of a job.")));
             $operation = GetParm('operation', PARM_TEXT);
             $job_id = GetParm('job_list', PARM_TEXT);
             $priority_id = GetParm('priority_list', PARM_TEXT);
             $level_id = GetParm('level_list', PARM_TEXT);
             if (!empty($operation)) {
                 $report = "";
                 $response_from_scheduler = $this->OperationSubmit($operation, $job_id, $priority_id, $level_id);
                 $operation_text = $this->GetOperationText($operation);
                 if (empty($this->error_info)) {
                     $text = _("successfully");
                     $status_msg .= "{$operation_text} {$text}.";
                     if (!empty($response_from_scheduler)) {
                         $report .= "<hr style='border-style:dashed'>";
                         /* add one dashed line */
                         $report .= $response_from_scheduler;
                     }
                 } else {
                     $text = _("failed");
                     $status_msg .= "{$operation_text} {$text}.";
                     $report .= $this->error_info;
                 }
                 echo displayMessage($status_msg, $report);
             }
             $text = _("List of operations:");
             $V .= $text;
             $V .= "<ul>";
             foreach ($this->operation_array as $value) {
                 $V .= "<li><b>{$value['0']}</b>: {$value['1']}</li>";
             }
             $V .= "</ul>";
             $V .= "<hr>";
             $text = _("Select an operation");
             $V .= "<form id='operation_form' method='post'>";
             $V .= "<p><li>{$text}: ";
             $V .= "<select name='operation' id='operation' onchange='OperationSwich_Get(\"" . Traceback_uri() . "?mod=ajax_admin_scheduler&operation=\"+this.value)'<br />\n";
             $V .= $this->OperationListOption();
             $V .= "</select>\n";
             $V .= "<br><br>";
             $V .= "<div id='div_operation'>";
             $text = _("Select the scheduler or a job");
             $V .= "{$text}: <select name='job_list' id='job_list'>";
             $V .= $this->JobListOption('status');
             $V .= "</select>";
             $V .= "</div>";
             $V .= "<hr>";
             $text = _("Submit");
             $V .= "<input type='submit' value='{$text}' />\n";
             $V .= "</form>";
             $choice = ActiveHTTPscript("OperationSwich");
             $choice .= "<script language='javascript'>\n\n        function OperationSwich_Reply()\n\n        {\n\n          if ((OperationSwich.readyState==4) && (OperationSwich.status==200)) \n\n          {\n\n            document.getElementById('div_operation').innerHTML = OperationSwich.responseText;\n\n          }\n\n        }\n\n        </script>\n";
             $V .= $choice;
             break;
         case "Text":
             break;
         default:
             break;
     }
     if (!$this->OutputToStdout) {
         return $V;
     }
     print "{$V}";
     return;
 }
Example #29
0
<?php 
page_header();
admin_menu(ADMIN_PAGE_INBOX);
?>

		
<!-- Page Content -->
<div id="pagecontent">
<div class='message dynamic' style='display:none'></div>
<?php 
if (isset($_SESSION['s_mid'])) {
    $_SESSION['Smessage'] = "Logged in as scientist.";
    $_SESSION['Stype'] = 2;
    $_SESSION['Sdetail'] = "";
    displayMessage('Smessage', 'Sdetail', 'Stype');
}
?>
<!-- form box -->
<br />
<div id="registercontent">
<div id="container">
<div class="tabs">
<ul class="menu">
<li class="active"><a href="#current"><?php 
echo _("New");
?>
</a></li>
<li ><a href="#past"><?php 
echo _("Archived");
?>
Example #30
0
    if ($r = $server->store_result()) {
        $r->free();
    }
} while ($server->more_results() && $server->next_result());
$result = $server->query("SELECT id FROM settings WHERE name='title'");
if ($result->num_rows == 1) {
    if (!@chmod('../install', 0777)) {
        echo "PLEASE DELETE install/ FOLDER MANUALLY. THEN GO TO yourwebsite.com/feedback/admin/ TO LOG IN.";
        exit;
    }
    //In case of success (by using previously set parameters), delete the content of installation folder
    unlink('index.php');
    unlink('install1.php');
    unlink('database_tables.sql');
    unlink('index2.php');
    unlink('install2.php');
    header('Location: ../admin');
    exit;
} else {
    $server->query("INSERT INTO users(id,name,email,pass,votes,isadmin,banned) VALUES('','" . $_POST['adminname'] . "','" . $_POST['adminemail'] . "','" . $hashing->hash($_POST['adminpass']) . "', 20, 3,0)");
    if (!@chmod('../install', 0777)) {
        $url = getBaseUrl();
        displayMessage("PLEASE DELETE install/index.php, install/install1.php AND install/database_tables.sql FILES MANUALLY.<br />\n            THEN GO TO <a href='" . $url . "/install/index2.php'>yourwebsite.com/feedback/install/index2.php</a> TO CONTINUE THE INSTALLATION.");
        exit;
    }
    //In case of success, delete the installation files of the first step
    unlink('index.php');
    unlink('install1.php');
    unlink('database_tables.sql');
    header('Location: index2.php');
}