Commit 9a29cd0f authored by Project Open's avatar Project Open

- Initial import

parent ecdfb282
Pipeline #1115 canceled with stages
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:~/bin
export EDITOR=emacs
alias "l=ls -als"
test -s ~/.alias && . ~/.alias || true
if [ "$PS1" ]; then
case $TERM in
xterm*)
if [ -e /etc/sysconfig/bash-prompt-xterm ]; then
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm
else
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}"; echo -ne "\007"'
fi
;;
screen)
if [ -e /etc/sysconfig/bash-prompt-screen ]; then
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-screen
else
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}"; echo -ne "\033\\"'
fi
;;
*)
[ -e /etc/sysconfig/bash-prompt-default ] && PROMPT_COMMAND=/etc/sysconfig/bash-prompt-default
;;
esac
# Turn on checkwinsize
shopt -s checkwinsize
[ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \w]\\$ "
fi
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
[user]
email = info@project-open.com
name = Project Open
[credential]
helper = cache --timeout 3600
[pull]
rebase = false
[core]
excludesfile = /web/projop/.gitignore_global
This diff is collapsed.
################################################################
# v0.1 - USE WITH CAUTION
# Last changed: 2016-10-12
################################################################
#
# Drops ]po[ 4.x and ]po[ 5.x servers
#
################################################################
# ToDo:
################################################################
# defaults
# function usage () {
# cat <<EOF
# Usage: createserver.sh [options] user [password]
# -h, --help help
# Example: dropserver.sh worldbank
# EOF
# exit
# }
# Must run as root so that we can shutdown backuppc and mount drives
if [ $(whoami) != "root" ]; then
echo "You need to run this script as root."
echo "Use 'sudo ./$script_name' then enter your password when prompted."
exit 1
fi
POUSER=$1
if [ $? != 0 ] ; then
echo "wrong option..." >&2 ;
# usage
fi
if test "$POUSER" = ""; then
echo "param missing"
# usage
fi
#
# directories
#
WEBDIR=/web
HOMEDIR=$WEBDIR/$POUSER
SERVICEDIR=/web/service/$POUSER
GRAVEYARD=/web/garbage/backup_canceled_servers
echo "drop server for '$POUSER'"
read -p "Continue (y/n)?"
if [ $REPLY == "n" ]; then
exit 1
fi
echo "Remove ]po[ v4 (PostgreSQL 8.4) or v5 (PostgreSQL 9.x)? "
echo "]po[ Server (4/5)?"
read pgversion
if [ $pgversion = 4 ]; then
echo "Setting executables for PostgreSQL 8.4"
PGDUMP=/usr/bin/pg_dump
DROPDB=/usr/bin/dropdb
DROPUSER=/usr/bin/dropuser
elif [ $pgversion = 5 ]; then
echo "Setting executables for PostgreSQL 9.x"
PGDUMP="/usr/local/pgsql95/bin/pg_dump -p 5433"
DROPDB="/usr/local/pgsql95/bin/dropdb -p 5433"
DROPUSER="/usr/bin/dropuser -p 5433"
else
echo "Unable to set executables. Quitting"
exit 1
fi
# Alternatives:
# PGDUMP="/usr/local/pgsql/bin/pg_dump -p 5433"
# DROPDB="/usr/local/pgsql/bin/dropdb -p 5433"
# DROPUSER="/usr/local/pgsql/bin/dropuser -p 5433"
NOW=$(date +"%y%m%d%H%M%S")
echo "Creating unique folder in /tmp: $NOW"
mkdir /tmp/$NOW
if ! test -e $SCRIPTDIR/$DBDUMP; then
echo "$SCRIPTDIR/$DBDUMP doesn't exist (SCRIPTDIR=$SCRIPTDIR)"
exit
fi
# shut down service
# svc -d /web/service/$POUSER
# delete old backups & dump database
echo ""
echo "Now Shut down server ..."
echo "svc -d /web/service/$POUSER"
read -p "Continue (y/n)?"
if [ $REPLY == "y" ]; then
svc -d /web/service/$POUSER
echo "server shut down"
fi
echo ""
echo "Now move old backups to temp folder ...."
echo "mv /web/$POUSER/filestorage/backup/*.sql /tmp/$NOW/"
read -p "Continue (y/n)?"
if [ $REPLY == "y" ]; then
mv /web/$POUSER/filestorage/backup/*.sql /tmp/$NOW/
echo "moved files to tmp folder"
fi
echo ""
echo "Creating DB dump:"
echo "/bin/su --login $POUSER --command $PGDUMP --no-owner --clean --disable-dollar-quoting --format=p --file=/web/$POUSER/filestorage/backup/pg_dump.aachen.project-open.net.$POUSER.final.sql"
read -p "Continue (y/n)?"
if [ $REPLY == "y" ]; then
/bin/su --login $POUSER --command "$PGDUMP --no-owner --clean --disable-dollar-quoting --format=p --file=/web/$POUSER/filestorage/backup/pg_dump.aachen.project-open.net.$POUSER.final.sql"
echo "created new db_dump"
fi
echo ""
echo "Drop DB:"
echo "/bin/su --login $POUSER --command '$DROPDB $POUSER'"
read -p "Continue (y/n)?"
if [ $REPLY == "y" ]; then
/bin/su --login $POUSER --command "$DROPDB $POUSER"
echo "dropped db"
fi
echo ""
echo "Now tar filstorage and move to grave yard ..."
echo "tar czvf $GRAVEYARD/filestorage_$POUSER.tgz /web/$POUSER/filestorage"
read -p "Continue (y/n)?"
if [ $REPLY == "y" ]; then
tar czvf $GRAVEYARD/filestorage_$POUSER.tgz /web/$POUSER/filestorage
echo "Filestorage moved to grave yard"
fi
echo ""
echo "Now removing server:"
echo "mv /web/$POUSER /tmp/$NOW/"
read -p "Continue (y/n)?"
if [ $REPLY == "y" ]; then
mv /web/$POUSER /tmp/$NOW/
echo "Moved server to tmp folder"
fi
echo ""
# echo "Now removing service ..."
# echo "mv /web/service/$POUSER /tmp/$NOW"
# read -p "Continue (y/n)?"
# if [ $REPLY == "y" ]; then
# mv /web/service/$POUSER /tmp/$NOW
# echo "Moved server to tmp folder"
# fi
# echo ""
echo "Now delete user ..."
echo "userdel $POUSER"
read -p "Continue (y/n)?"
if [ $REPLY == "y" ]; then
userdel $POUSER
echo "User deleted"
fi
echo ""
echo " /bin/su --login postgres --command '$DROPUSER $POUSER'"
read -p "Continue (y/n)?"
if [ $REPLY == "y" ]; then
/bin/su --login postgres --command "$DROPUSER $POUSER"
echo "db user dropped"
fi
echo "Now removing service ..."
echo "mv /web/service/$POUSER /tmp/$NOW/ttt"
read -p "Continue (y/n)?"
if [ $REPLY == "y" ]; then
mv /web/service/$POUSER /tmp/$NOW/ttt
echo "Moved service directory to tmp folder"
fi
echo ""
echo ""
echo ""
echo "*** Finished script ***"
echo ""
echo ""
exit 0
This diff is collapsed.
This diff is collapsed.
#!/bin/bash
git clone https://gitlab.project-open.net/project-open/acs-admin.git
git clone https://gitlab.project-open.net/project-open/acs-api-browser.git
git clone https://gitlab.project-open.net/project-open/acs-authentication.git
git clone https://gitlab.project-open.net/project-open/acs-automated-testing.git
git clone https://gitlab.project-open.net/project-open/acs-bootstrap-installer.git
git clone https://gitlab.project-open.net/project-open/acs-content-repository.git
git clone https://gitlab.project-open.net/project-open/acs-core-docs.git
git clone https://gitlab.project-open.net/project-open/acs-datetime.git
git clone https://gitlab.project-open.net/project-open/acs-developer-support.git
git clone https://gitlab.project-open.net/project-open/acs-events.git
git clone https://gitlab.project-open.net/project-open/acs-kernel.git
git clone https://gitlab.project-open.net/project-open/acs-lang.git
git clone https://gitlab.project-open.net/project-open/acs-mail.git
git clone https://gitlab.project-open.net/project-open/acs-mail-lite.git
git clone https://gitlab.project-open.net/project-open/acs-messaging.git
git clone https://gitlab.project-open.net/project-open/acs-reference.git
git clone https://gitlab.project-open.net/project-open/acs-service-contract.git
git clone https://gitlab.project-open.net/project-open/acs-subsite.git
git clone https://gitlab.project-open.net/project-open/acs-tcl.git
git clone https://gitlab.project-open.net/project-open/acs-templating.git
git clone https://gitlab.project-open.net/project-open/acs-translations.git
git clone https://gitlab.project-open.net/project-open/acs-workflow.git
git clone https://gitlab.project-open.net/project-open/ajaxhelper.git
git clone https://gitlab.project-open.net/project-open/attachments.git
git clone https://gitlab.project-open.net/project-open/calendar.git
git clone https://gitlab.project-open.net/project-open/categories.git
git clone https://gitlab.project-open.net/project-open/diagram.git
git clone https://gitlab.project-open.net/project-open/file-storage.git
git clone https://gitlab.project-open.net/project-open/general-comments.git
git clone https://gitlab.project-open.net/project-open/intranet-agile.git
git clone https://gitlab.project-open.net/project-open/intranet-calendar.git
git clone https://gitlab.project-open.net/project-open/intranet-confdb.git
git clone https://gitlab.project-open.net/project-open/intranet-core.git
git clone https://gitlab.project-open.net/project-open/intranet-cost.git
git clone https://gitlab.project-open.net/project-open/intranet-crm-opportunities.git
git clone https://gitlab.project-open.net/project-open/intranet-csv-import.git
git clone https://gitlab.project-open.net/project-open/intranet-cvs-integration.git
git clone https://gitlab.project-open.net/project-open/intranet-department-planner.git
git clone https://gitlab.project-open.net/project-open/intranet-demo-data.git
git clone https://gitlab.project-open.net/project-open/intranet-dw-light.git
git clone https://gitlab.project-open.net/project-open/intranet-dynfield.git
git clone https://gitlab.project-open.net/project-open/intranet-earned-value-management.git
git clone https://gitlab.project-open.net/project-open/intranet-exchange-rate.git
git clone https://gitlab.project-open.net/project-open/intranet-expenses.git
git clone https://gitlab.project-open.net/project-open/intranet-expenses-workflow.git
git clone https://gitlab.project-open.net/project-open/intranet-filestorage.git
git clone https://gitlab.project-open.net/project-open/intranet-forum.git
git clone https://gitlab.project-open.net/project-open/intranet-freelance.git
git clone https://gitlab.project-open.net/project-open/intranet-gantt-editor.git
git clone https://gitlab.project-open.net/project-open/intranet-ganttproject.git
git clone https://gitlab.project-open.net/project-open/intranet-helpdesk.git
git clone https://gitlab.project-open.net/project-open/intranet-hr.git
git clone https://gitlab.project-open.net/project-open/intranet-idea-management.git
git clone https://gitlab.project-open.net/project-open/intranet-invoices.git
git clone https://gitlab.project-open.net/project-open/intranet-invoices-templates.git
git clone https://gitlab.project-open.net/project-open/intranet-jira.git
git clone https://gitlab.project-open.net/project-open/intranet-mail-import.git
git clone https://gitlab.project-open.net/project-open/intranet-material.git
git clone https://gitlab.project-open.net/project-open/intranet-milestone.git
git clone https://gitlab.project-open.net/project-open/intranet-nagios.git
git clone https://gitlab.project-open.net/project-open/intranet-notes.git
git clone https://gitlab.project-open.net/project-open/intranet-payments.git
git clone https://gitlab.project-open.net/project-open/intranet-planning.git
git clone https://gitlab.project-open.net/project-open/intranet-portfolio-management.git
git clone https://gitlab.project-open.net/project-open/intranet-portfolio-planner.git
git clone https://gitlab.project-open.net/project-open/intranet-project-scoring.git
git clone https://gitlab.project-open.net/project-open/intranet-release-mgmt.git
git clone https://gitlab.project-open.net/project-open/intranet-reporting.git
git clone https://gitlab.project-open.net/project-open/intranet-reporting-dashboard.git
git clone https://gitlab.project-open.net/project-open/intranet-reporting-finance.git
git clone https://gitlab.project-open.net/project-open/intranet-reporting-indicators.git
git clone https://gitlab.project-open.net/project-open/intranet-reporting-openoffice.git
git clone https://gitlab.project-open.net/project-open/intranet-reporting-tutorial.git
git clone https://gitlab.project-open.net/project-open/intranet-resource-management.git
git clone https://gitlab.project-open.net/project-open/intranet-rest.git
git clone https://gitlab.project-open.net/project-open/intranet-riskmanagement.git
git clone https://gitlab.project-open.net/project-open/intranet-rule-engine.git
git clone https://gitlab.project-open.net/project-open/intranet-search-pg.git
git clone https://gitlab.project-open.net/project-open/intranet-security-update-client.git
git clone https://gitlab.project-open.net/project-open/intranet-sharepoint.git
git clone https://gitlab.project-open.net/project-open/intranet-simple-survey.git
git clone https://gitlab.project-open.net/project-open/intranet-sla-management.git
git clone https://gitlab.project-open.net/project-open/intranet-spam.git
git clone https://gitlab.project-open.net/project-open/intranet-sql-selectors.git
git clone https://gitlab.project-open.net/project-open/intranet-sugarcrm.git
git clone https://gitlab.project-open.net/project-open/intranet-sysconfig.git
git clone https://gitlab.project-open.net/project-open/intranet-task-management.git
git clone https://gitlab.project-open.net/project-open/intranet-timesheet2.git
git clone https://gitlab.project-open.net/project-open/intranet-timesheet2-invoices.git
git clone https://gitlab.project-open.net/project-open/intranet-timesheet2-task-popup.git
git clone https://gitlab.project-open.net/project-open/intranet-timesheet2-tasks.git
git clone https://gitlab.project-open.net/project-open/intranet-timesheet2-workflow.git
git clone https://gitlab.project-open.net/project-open/intranet-wiki.git
git clone https://gitlab.project-open.net/project-open/intranet-workflow.git
git clone https://gitlab.project-open.net/project-open/intranet-xmlrpc.git
git clone https://gitlab.project-open.net/project-open/mail-tracking.git
git clone https://gitlab.project-open.net/project-open/notifications.git
git clone https://gitlab.project-open.net/project-open/oacs-dav.git
git clone https://gitlab.project-open.net/project-open/openacs-default-theme.git
git clone https://gitlab.project-open.net/project-open/organizations.git
git clone https://gitlab.project-open.net/project-open/postal-address.git
git clone https://gitlab.project-open.net/project-open/ref-countries.git
git clone https://gitlab.project-open.net/project-open/ref-currency.git
git clone https://gitlab.project-open.net/project-open/ref-language.git
git clone https://gitlab.project-open.net/project-open/ref-timezones.git
git clone https://gitlab.project-open.net/project-open/ref-us-counties.git
git clone https://gitlab.project-open.net/project-open/ref-us-states.git
git clone https://gitlab.project-open.net/project-open/ref-us-zipcodes.git
git clone https://gitlab.project-open.net/project-open/rss-support.git
git clone https://gitlab.project-open.net/project-open/search.git
git clone https://gitlab.project-open.net/project-open/sencha-core.git
git clone https://gitlab.project-open.net/project-open/sencha-extjs-v421.git
git clone https://gitlab.project-open.net/project-open/senchatouch-v242.git
git clone https://gitlab.project-open.net/project-open/senchatouch-timesheet.git
git clone https://gitlab.project-open.net/project-open/simple-survey.git
git clone https://gitlab.project-open.net/project-open/tsearch2-driver.git
git clone https://gitlab.project-open.net/project-open/wiki.git
git clone https://gitlab.project-open.net/project-open/workflow.git
git clone https://gitlab.project-open.net/project-open/xml-rpc.git
git clone https://gitlab.project-open.net/project-open/xotcl-core.git
git clone https://gitlab.project-open.net/project-open/xotcl-request-monitor.git
git clone https://gitlab.project-open.net/project-open/xowiki.git
#!/bin/bash
# No directory has been provided, use current
dir="$1"
if [ -z "$dir" ]
then
dir="`pwd`"
fi
# Make sure directory ends with "/"
if [[ $dir != */ ]]
then
dir="$dir/*"
else
dir="$dir*"
fi
# Loop all sub-directories
for f in $dir
do
# Only interested in directories
[ -d "${f}" ] || continue
# Only interested in GIT repositories
[ -d "$f/.git" ] || continue
cd $f
# Format the output - use colors only in terminal
if test -t 1; then
echo ""
echo -en "\033[0;35m"
echo "${f}"
echo -en "\033[0m"
else
echo "${f}"
fi
git pull
done
#!/bin/bash
# find "$(pwd -P)" -maxdepth 1 -mindepth 1 -type d -exec bash -c "cd {}; pwd; git status --porcelain" \;
# No directory has been provided, use current
dir="$1"
if [ -z "$dir" ]
then
dir="`pwd`"
fi
# Make sure directory ends with "/"
if [[ $dir != */ ]]
then
dir="$dir/*"
else
dir="$dir*"
fi
# Loop all sub-directories
for f in $dir
do
# Only interested in directories
[ -d "${f}" ] || continue
# Only interested in GIT repositories
[ -d "$f/.git" ] || continue
cd $f
if [ $(git status --porcelain | wc -l) -eq 0 ]
then
continue
fi
# Format the output - use colors only in terminal
if test -t 1; then
echo ""
echo -en "\033[0;35m"
echo "${f}"
echo -en "\033[0m"
else
echo "${f}"
fi
git status --porcelain
done
#!/bin/bash
# find "$(pwd -P)" -maxdepth 1 -mindepth 1 -type d -exec bash -c "cd {}; pwd; git status --porcelain" \;
# No directory has been provided, use current
dir="$1"
if [ -z "$dir" ]
then
dir="`pwd`"
fi
# Make sure directory ends with "/"
if [[ $dir != */ ]]
then
dir="$dir/*"
else
dir="$dir*"
fi
# Loop all sub-directories
for f in $dir
do
# Only interested in directories
[ -d "${f}" ] || continue
# Only interested in GIT repositories
[ -d "$f/.git" ] || continue
cd $f
# Check for changes
modified=0
if [ $(git status --porcelain | wc -l) -ne 0 ]
then
modified=1
fi
if [ $(git status | grep ahead | wc -l) -ne 0 ]
then
modified=1
fi
if [ $modified -eq 0 ]
then
continue
fi
# Format the output - use colors only in terminal
if test -t 1; then
echo ""
echo -en "\033[0;35m"
echo "${f}"
echo -en "\033[0m"
else
echo "${f}"
fi
# git status --porcelain
git status
done
#!/usr/bin/perl
# --------------------------------------------------------------
# po_security_check
#
# Automatic Security Check
# Copyright (c) 2004 - 2009 ]project-open[
#
# @author: Frank Bergmann <frank.bergmann@project-open.com>
# --------------------------------------------------------------
use strict;
# Constants, variables and parameters
#
my $debug = 0;
my $folder_root = "/web/projop/packages/intranet-*";
print "ToDo: Add a search for 'eval' and 'exec' to the security check to see potential vulnerabilities\n";
# Write a .CSV Header line so that the output can
# be opened by Excel directly.
print "filename;status;require_login;ad_maybe_redirect_for_registration;ad_verify_and_get_user_id;unsave_dollar;im_permission;comment\n";
# Main loop: use "find" to get the list of all TCL
# files in $folder_root.
#
my $last_package_key = "";
open(FILES, "find $folder_root -type f | grep -v CVS |");
while (my $file=<FILES>) {
# Remove trailing "\n"
chomp($file);
my $is_library_tcl = 0;
# Print a header line for every package
&print_header($file);
# Extract the file extension
$file =~ /\.([^\.]*)$/;
my $file_ext=$1;
# Check if this is a library file
if ($file =~ /\/tcl\//) { $is_library_tcl = 1; }
# Treat the files according to their extension
&analyze_tcl_page($file) if ($file_ext =~ /tcl$/ and 0 == $is_library_tcl);
&analyze_tcl_lib($file) if ($file_ext =~ /tcl$/ and 1 == $is_library_tcl);
# &analyze_xql($file) if ($file_ext =~ /xql$/);
# &analyze_adp($file) if ($file_ext =~ /adp$/);
}
close(FILES);
# Print a new line in the CSV file for every
# package that we find...
# file may look like: "N:\aimdev\packages\nesta-static\..."
#
sub print_header {
(my $file) = @_;
print "print_header: file='$file'\n" if ($debug > 1);
if ($file =~ /packages\/([^\/]*)\//) {
my $package_key = $1;
if ($last_package_key ne $package_key) {
print "$package_key\n";
$last_package_key = $package_key;
}
}
}
# Analyze a single TCL page:
# We're currently checking for the the presence of
# autentication only ([auth::require_login] or similar).
#
sub analyze_tcl_page {
(my $file) = @_;
print "analyze_tcl_page: file='$file'\n" if ($debug);
my $require_login = 0;
my $ad_maybe_redirect_for_registration = 0;
my $ad_verify_and_get_user_id = 0;
my $unsave_dollar = 0;
my $im_permission = 0;
my $comment = "";
open(F, $file);
while (my $line = <F>) {
$require_login++ if ($line =~ /require_login/);
$im_permission++ if ($line =~ /im_permission/);
$ad_maybe_redirect_for_registration++ if ($line =~ /ad_maybe_redirect_for_registration/);
$ad_verify_and_get_user_id++ if ($line =~ /ad_verify_and_get_user_id/);
}
close(F);
# Calculate the status - green, yellow or red
my $sum = $require_login + $ad_maybe_redirect_for_registration + $ad_verify_and_get_user_id;
my $status = "undefined";
if ($sum == 0) {
$status = "red";
$comment = "Didn't find any authentication in file";
}
if ($sum > 0) {
$status = "yellow";
$comment = "Authentication found, but deprecated";
}
$status = "green" if ($require_login > 0);
print "$file;$status;$require_login;$ad_maybe_redirect_for_registration;$ad_verify_and_get_user_id;$unsave_dollar;$im_permission;\"$comment\"\n";
}
# Analyze a single XQL file:
# We just check that it doesn't contain "$"-variables.
#
#
sub analyze_xql {
(my $file) = @_;
print "analyze_xql: file='$file'\n" if ($debug);
my $dollar_count = 0;
my $status = "undefined";
my $comment = "";
open(F, $file);
while (my $line = <F>) {
if ($line =~ /\$(\w*)/) {
$dollar_count++;
$comment = $comment." \$$1";
}
}
close(F);
# Calculate the status - green, yellow or red
$status = "green";
if ($dollar_count > 0) {
$status = "yellow";
$comment = $comment." - Found a \$ character in XQL file";
}
print "$file;$status;;;;$dollar_count;;\"$comment\"\n";
}
# Analyze a single TCL library file
#
sub analyze_tcl_lib {
(my $file) = @_;
print "analyze_tcl_lib: file='$file'\n" if ($debug);
}
#!/usr/bin/perl
# --------------------------------------------------------------
# po-untranslated-messages.perl
#
# Analyzes a log file and creates a number of DB statements to insert the missing language keys
# 2010-04-05 Frank Bergmann
# --------------------------------------------------------------
# Constants, variables and parameters
#
$debug = 0;
$file = $ARGV[0];
print "po-untranslated-messages: Analyzing file: $file\n" if $debug > 0;
open(FILE, $file);
while (my $line=<FILE>) {
chomp($line);
# line looks like this:
# [11/Apr/2010:14:49:38][28470.78687120][-conn2-] Error: lang::message::lookup: Key 'intranet-core.Translation_Freelance_List' does not exist in en_US
if ($line =~ /Error: lang::message::lookup: Key \'([^']*)\' does not/) {
my $compound_key = $1;
print "po-untranslated-messages: found untranslated key '$compound_key'\n" if $debug > 0;
if ($compound_key =~ /^([a-zA-Z\-]*)\.(.*)/) {
my $package_key = $1;
my $message_key = $2;
if ($package_key =~ /\ /) {
print "ERROR: package_key '$package_key' contains spaces.\n";
next;
}
if ($message_key =~ /\ /) {
print "ERROR: message_key '$message_key' contains spaces.\n";
next;
}
print "SELECT im_lang_add_message('en_US','$package_key','$message_key','$message_key');\n"
}
}
}
close(FILE);
This is the file storage area for storing content repository data.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# /tcl/0-acs-init.tcl
#
# The very first file invoked when OpenACS is started up. Sources
# /packages/acs-tcl/bootstrap/bootstrap.tcl.
#
# jsalz@mit.edu, 12 May 2000
#
# $Id$
namespace eval acs {
#
# Determine, under which server we are running
#
set ::acs::useNaviServer [expr {[ns_info name] eq "NaviServer"}]
#
# Initialize the list of known database types . User code should use the database
# API routine db_known_database_types rather than reference the nsv list directly.
# We might change the way this is implemented later. Each database type is
# represented by a list consisting of the internal name, driver name, and
# "pretty name" (used by the APM to list the available database engines that
# one's package can choose to support). The driver name and "pretty name" happen
# to be the same for PostgreSQL and Oracle but let's not depend on that being true
# in all cases...
#
set ::acs::known_database_types {
{oracle Oracle Oracle}
{postgresql PostgreSQL PostgreSQL}
}
#
# Enable / disable features depending on availability
#
set ::acs::pageroot [expr {$::acs::useNaviServer ? [ns_server pagedir] : [ns_info pageroot]}]
set ::acs::tcllib [expr {$::acs::useNaviServer ? [ns_server tcllib] : [ns_info tcllib]}]
set ::acs::rootdir [file dirname [string trimright $::acs::tcllib "/"]]
set ::acs::useNsfProc [expr {[info commands ::nsf::proc] ne ""}]
}
# Determine the OpenACS root directory, which is the directory right above the
# Tcl library directory ::acs::tcllib.
nsv_set acs_properties root_directory $::acs::rootdir
ns_log "Notice" "Loading OpenACS, rooted at $::acs::rootdir"
set bootstrap_file "$::acs::rootdir/packages/acs-bootstrap-installer/bootstrap.tcl"
if { [file isfile $bootstrap_file] } {
ns_log "Notice" "Sourcing $bootstrap_file"
#
# Check that the appropriate version of tDom (http://www.tdom.org)
# is installed and spit out a comment or try to install it if not.
#
if {[info commands domNode] eq ""} {
if {[ns_info version] < 4} {
ns_log Error "0-acs-init.tcl: domNode command not found -- libtdom.so not loaded?"
} elseif {[ns_info version] >= 4} {
if {[catch {set version [package require tdom]} errmsg]} {
ns_log Error "0-acs-init.tcl: error loading tdom: $errmsg"
} else {
lassign [split $version .] major minor point
if {$major == 0
&& ( $minor < 7 || ($minor == 7 && $point < 8))} {
ns_log Error "0-acs-init.tcl: please use tDOM version 0.7.8 or greater (you have version $version)"
}
}
}
}
source $bootstrap_file
} else {
ns_log "Error" "$bootstrap_file does not exist. Aborting the OpenACS load process."
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
# $Id$
# Name: 00-ad-postload.tcl
# Author: Jon Salz <jsalz@mit.edu>
# Date: 24 Feb 2000
# Description: Sources library files that need to be loaded after the rest.
ns_log "Notice" "Sourcing files for postload..."
foreach file [glob -nocomplain ${::acs::tcllib}/*.tcl.postload] {
ns_log Notice "postloading $file"
source $file
}
ns_log "Notice" "Done."
# This should probably be moved to the end of bootstrap.tcl once all files are
# weeded out of the Tcl directory.
ns_log "Notice" "Executing initialization code blocks..."
foreach init_item [nsv_get ad_after_server_initialization .] {
array set init $init_item
ns_log "Notice" "Executing initialization code block $init(name) in $init(script)"
if { [llength $init(args)] == 1 } {
set init(args) [lindex $init(args) 0]
}
if { [catch $init(args) error] } {
ns_log "Error" "Error executing initialization code block $init(name) in $init(script): $::errorInfo"
}
}
# The __is_xql helper function is used to filter out just the xql files.
#
# It should return true for directories it should descend as well
# If you had a large static tree with no .xql files you could return 0 on
# the subdirectory and it would not be searched.
proc __is_xql {arg} {
return [expr {[file isdirectory $arg] || [file extension $arg] eq ".xql"}]}
# We need to load query files for the top-level stuff in www and Tcl
# dirs is the list of directories to walk for xql files. Packages .xql
# files are parsed elsewhere in the bootstrap process.
foreach dir {www tcl} {
set files [ad_find_all_files -check_file_func __is_xql $::acs::rootdir/$dir]
ns_log Notice "QD=Postload files to load from $dir: $files"
foreach file $files {
db_qd_load_query_file $file
}
}
nsv_unset ad_after_server_initialization .
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
# This page changes the current user's auth token, thus causing the user's authentication to become expired
# This can be useful for testing/troubleshooting expiring logins.
sec_change_user_auth_token [ad_conn untrusted_user_id]
ad_returnredirect security-debug
ns_log notice "CSP violation: [ns_conn content] user-agent: [ns_set iget [ns_conn headers] user-agent] user_id [ad_conn user_id] peer [ad_conn peeraddr]"
ns_return 200 text/plain ok
ad_page_contract {
This is called by server monitoring scripts, such as
keepalive (see http://arsdigita.com/free-tools/keepalive.html)
if it doesn't return "success" then they are supposed
to kill the AOLserver.
You can also use this with our Uptime monitoring system,
described in Chapter 15 of http://photo.net/wtr/thebook/
This tests total db connectivity.
@cvs-id $Id: dbtest-other.tcl,v 1.1.1.1 2001/03/13 22:59:27 ben Exp $
} { }
if { ![db_0or1row date_check {
select sysdate from dual
}] } {
doc_return 500 text/plain "failed"
} else {
ns_return 200 text/plain "success"
}
ad_page_contract {
This is called by server monitoring scripts, such as
keepalive (see http://arsdigita.com/free-tools/keepalive.html)
if it doesn't return "success" then they are supposed
to kill the AOLserver.
You can also use this with our Uptime monitoring system,
described in Chapter 15 of http://photo.net/wtr/thebook/
This tests total db connectivity of all 3 database pools.
@cvs-id $Id: dbtest.tcl,v 1.2 2009/11/17 22:26:13 ryang Exp $
} { }
if { [catch {
db_foreach check_pool1 "select sysdate from dual" {
db_foreach check_pool2 "select sysdate from dual" {
db_1row check_pool3 "select sysdate from dual"
}
}
} errmsg] } {
doc_return 500 text/plain "failed"
} else {
ns_return 200 text/plain "success"
}
ad_page_contract {
Performs util_memoize_flush_local on the statement parameter.
@author Jon Salz [jsalz@mit.edu]
@creation-date 29 Feb 2000
@cvs-id $Id: flush-memoized-statement.tcl,v 1.2 2002/09/10 22:23:31 jeffd Exp $
} {
statement
}
if { ![server_cluster_authorized_p [ns_conn peeraddr]] } {
ns_returnforbidden
return
}
util_memoize_flush_local [ns_queryget statement]
if { [server_cluster_logging_p] } {
ns_log "Notice" "Distributed flush of [ns_queryget statement]"
}
doc_return 200 "text/plain" "Successful."
# NOTE:
# Comment out below two lines to use this page
#
ns_return 200 text/html "Forbidden"
return
sec_login_handler
set session_id {}
catch { set session_id [ad_get_signed_cookie_with_expr "ad_session_id"] } session_id
set ad_user_login {}
catch { set ad_user_login [ad_get_signed_cookie "ad_user_login"] } ad_user_login
set ad_user_login_secure {}
catch { set ad_user_login_secure [ad_get_signed_cookie "ad_user_login_secure"] } ad_user_login_secure
set ad_secure_token {}
catch { set ad_secure_token [ad_get_signed_cookie "ad_secure_token"] } ad_secure_token
set auth_expires_in "N/A"
catch {
set login_list [split [ad_get_signed_cookie "ad_user_login"] ","]
set login_expr [lindex $login_list 1]
set auth_expires_in [expr [sec_login_timeout] - ([ns_time] - $login_expr)]
}
set page "<html><body>
<h1>Debug Page For Security Cookies</h1>
<h2>Cookies</h2>
<table border=1>
<tr><th>Cookie name</th><th>Value</th><th>Explanation</th></tr>
<tr><td>session_id<td><code>$session_id</code><td>session_id, user_id, login_level expiration</tr>
<tr><td>ad_user_login<td><code>$ad_user_login</code><td>user_id, issue_time, auth_token</tr>
<tr><td>ad_user_login_secure<td><code>$ad_user_login_secure</code><td>...</tr>
<tr><td>ad_secure_token<td><code>$ad_secure_token</code><td>...</tr>
</table>
<p> Cookie HTTP header: </p> <pre>"
foreach elm [split [ns_set iget [ad_conn headers] Cookie] ";"] {
append page [string trim $elm] ";" \n
}
append page "
<h2>ad_conn</h2>
<p> user_id: <code>[ad_conn user_id]</code> </p>
<p> untrusted_user_id: <code>[ad_conn untrusted_user_id]</code> </p>
<p> auth_level: <code>[ad_conn auth_level]</code> </p>
<p> account_status: <code>[ad_conn account_status]</code> </p>
<h2>Authentication</h2>
<p> Authentication expires in: <code>$auth_expires_in</code> </p>
<p> LoginTimeout: <code>[sec_login_timeout]</code> </p>
[ad_decode [ad_conn untrusted_user_id] 0 "" "<p> auth_token: <code>[sec_get_user_auth_token [ad_conn untrusted_user_id]]</code> </p>"]
<p> <a href=change-auth-token>Change auth token</a> </p>
</body></html>"
ns_return 200 text/html $page
ns_return 200 text/plain "success"
@doc.type;literal@
<html<if @doc.lang@ not nil> lang="@doc.lang;literal@"</if>>
<head>
<title<if @doc.title_lang@ not nil and @doc.title_lang;literal@ ne @doc.lang;literal@> lang="@doc.title_lang;literal@"</if>>@doc.title@</title>
<multiple name="meta"> <meta<if @meta.http_equiv@ not nil> http-equiv="@meta.http_equiv;literal@"</if><if @meta.name@ not nil> name="@meta.name;noquote@"</if><if @meta.scheme@ not nil> scheme="@meta.scheme;noquote@"</if><if @meta.lang@ not nil and @meta.lang;literal@ ne @doc.lang;literal@> lang="@meta.lang;literal@"</if> content="@meta.content@">
</multiple>
<multiple name="link"> <link rel="@link.rel;literal@" href="@link.href@"<if @link.lang@ not nil and @link.lang;literal@ ne @doc.lang;literal@> lang="@link.lang;literal@"</if><if @link.title@ not nil> title="@link.title@"</if><if @link.type@ not nil> type="@link.type;literal@"</if><if @link.media@ not nil> media="@link.media;literal@"</if><if @link.integrity@ not nil> integrity="@link.integrity;literal@"</if><if @link.crossorigin@ not nil> crossorigin="@link.crossorigin;literal@"</if>>
</multiple>
<multiple name="___style"> <style type="@___style.type;literal@" <if @___style.lang@ not nil and @___style.lang;literal@ ne @doc.lang;literal@> lang="@___style.lang;literal@"</if><if @___style.title@ not nil> title="@___style.title@"</if><if @___style.media@ not nil> media="@___style.media;literal@"</if><if @::__csp_nonce@ not nil> nonce="@::__csp_nonce;literal@"</if>>@___style.style;literal@
</style>
</multiple>
<comment>
These two variables have to be set before the XinhaCore.js is loaded. To
enforce the order, it is put here.
</comment>
<if @::acs_blank_master__htmlareas@ defined and @::xinha_dir@ defined and @::xinha_lang@ defined>
<script type="text/javascript"<if @::__csp_nonce@ not nil> nonce="@::__csp_nonce;literal@"</if>>
_editor_url = "@::xinha_dir;literal@";
_editor_lang = "@::xinha_lang;literal@";
</script>
</if>
<multiple name="headscript"> <script type="@headscript.type;literal@"<if @headscript.src@ not nil> src="@headscript.src;literal@"</if><if @headscript.charset@ not nil> charset="@headscript.charset;literal@"</if><if @headscript.defer@ not nil> defer="@headscript.defer;literal@"</if><if @headscript.async@ not nil> async="@headscript.async;literal@"</if><if @headscript.integrity@ not nil> integrity="@headscript.integrity;literal@"</if><if @headscript.crossorigin@ not nil> crossorigin="@headscript.crossorigin;literal@"</if><if @::__csp_nonce@ not nil> nonce="@::__csp_nonce;literal@"</if>><if @headscript.content@ not nil>@headscript.content;noquote@</if></script>
</multiple>
<if @head@ not nil>@head;literal@</if>
</head>
<body<if @body.class@ not nil> class="@body.class;literal@"</if><if @body.id@ not nil> id="@body.id;literal@"</if>>
@header;literal@
<slave>
@footer;literal@
<multiple name="body_script"> <script type="@body_script.type;literal@"<if @body_script.src@ not nil> src="@body_script.src;literal@"</if><if @body_script.charset@ not nil> charset="@body_script.charset;literal@"</if><if @body_script.defer@ not nil> defer="@body_script.defer;literal@"</if><if @body_script.async@ not nil> async="@body_script.async;literal@"</if><if @body_script.integrity@ not nil> integrity="@body_script.integrity;literal@"</if><if @body_script.crossorigin@ not nil> crossorigin="@body_script.crossorigin;literal@"</if><if @::__csp_nonce@ not nil> nonce="@::__csp_nonce;literal@"</if>><if @body_script.content@ not nil>@body_script.content;literal@</if></script>
</multiple>
</body>
</html>
ad_page_contract {
This is the top level master template. It allows the basic parts of an HTML
document to be set through convenient data structures without introducing
anything site specific.
You should NEVER need to modify this file.
Most of the time your pages or master templates should not directly set this
file in their <master> tag. They should instead use site-master with
provides a set of standard OpenACS content. Only pages which need to return
raw HTML should use this template directly.
When using this template directly you MUST supply the following variables:
@property doc(title) The document title, ie. <title /> tag.
@property doc(title_lang) The language of the document title, if different
from the document language.
The document output can be customised by supplying the following variables:
@property doc(type) The declared xml DOCTYPE.
@property doc(charset) The document character set.
@property body(id) The id attribute of the body tag.
@property body(class) The class of the body tag.
ad_conn -set language Must be used to override the document language
if necessary.
To add a CSS or Javascripts to the <head> section of the document you can
call the corresponding template::head::add_* functions within your page.
@see template::head::add_css
@see template::head::add_javascript
More generally, meta, link and script tags can be added to the <head> section
of the document by calling their template::head::add_* function within your
page.
@see template::head::add_meta
@see template::head::add_link
@see template::head::add_script
Javascript event handlers, such as onload, an be added to the <body> tag by
calling template::add_body_handler within your page.
@see template::add_body_handler
Finally, for more advanced functionality see the documentation for
template::add_body_script, template::add_header and template::add_footer.
@see template::add_body_script
@see template::add_header
@see template::add_footer
@author Kevin Scaldeferri (kevin@arsdigita.com)
Lee Denison (lee@xarg.co.uk)
Gustaf Neumann
@creation-date 14 Sept 2000
$Id$
}
if {![info exists doc(type)]} {
set doc(type) {<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">}
}
#
# Add standard meta tags
#
template::head::add_meta \
-name generator \
-lang en \
-content "OpenACS version [ad_acs_version]"
# Add standard javascript
#
# Include core.js inclusion to the bottom of the body.
template::add_body_script -type "text/javascript" -src "/resources/acs-subsite/core.js"
#
# Add css for the current subsite, defaulting to the old list/form css which was
# hard-wired in previous versions of OpenACS.
set cssList [parameter::get -package_id [ad_conn subsite_id] -parameter ThemeCSS -default ""]
if {![string is list $cssList]} {
ns_log error "ignore value in ThemeCSS, since it is not a valid list: $cssList"
} elseif { [llength $cssList] > 0 } {
# DRB: Need to handle two cases, the lame first attempt and the more complete current
# attempt which allows you to specify all of the parameters to template::head::add_css
# (sigh, remove this kludge for 5.5.1). We need to handle the old case so upgrades
# to 5.5 for mgh and various of my sites work correctly.
#
# The following syntaxes are supported
#
# 1) pairs: {/resources/acs-templating/lists.css all} ...
# 2) nested list of pairs: {{href /resources/acs-templating/lists.css} {media all} ... } ...
# 3) flat list of -att val pairs: {-href /resources/acs-templating/lists.css -media all ... } ...
#
foreach css $cssList {
set first [lindex $css 0]
if { [llength $css] == 2 && [llength $first] == 1 && [string index $first 0] ne "-"} {
template::head::add_css -href $first -media [lindex $css 1]
} elseif {[llength $first] == 2} {
set params [list]
foreach param $css {
lappend params -[lindex $param 0] [lindex $param 1]
}
if {[catch {template::head::add_css {*}$params} errorMsg]} {
ns_log error $errorMsg
}
} else {
if {![string match -* [lindex $css 0]]} {
error "CSS specification '$css' is incorrect"
}
if {[catch {template::head::add_css {*}$css} errorMsg]} {
ns_log error $errorMsg
}
}
}
} else {
template::head::add_css \
-href "/resources/acs-templating/lists.css" \
-media "all"
template::head::add_css \
-href "/resources/acs-templating/forms.css" \
-media "all"
}
#
# Add js files via ThemeJS for the current subsite, similar to
# ThemeCSS. Syntax is the flat list syntax (3) from ThemeCSS, valid
# parameters are determined by template::add_script. It is possible to
# add head and body scripts.
set jsSpecs [parameter::get -package_id [ad_conn subsite_id] -parameter ThemeJS -default ""]
if {![string is list $jsSpecs]} {
ns_log error "ignore value in ThemeJS since it is not a valid list: $jsSpecs"
} else {
foreach jsSpec $jsSpecs {
if {[catch {template::add_script {*}$jsSpec} errorMsg]} {
ns_log error $errorMsg
}
}
}
#
# Render richtext widgets: The richtext widgets require typically a
# single configuration for all richtext widgets of a certain type on a
# page (that might require a list of the HTML IDs of all affected
# textareas).
#
::template::util::richtext::render_widgets
#
# Get the basic content info like title and charset for the head of
# the page.
#
if {![info exists doc(title)]} {
set doc(title) [ad_conn instance_name]
ns_log warning "[ad_conn url] has no doc(title) set, fallback to instance_name."
}
if {![info exists doc(charset)]} {
set doc(charset) [ns_config ns/parameters OutputCharset [ad_conn charset]]
}
#
# The document language is always set from [ad_conn lang] which by default
# returns the language setting for the current user. This is probably
# not a bad guess, but the rest of OpenACS must override this setting when
# appropriate and set the lang attribute of tags which differ from the language
# of the page. Otherwise we are lying to the browser.
#
set doc(lang) [ad_conn language]
template::head::add_meta \
-content "text/html; charset=$doc(charset)" \
-http_equiv "content-type"
#
# The following meta tags are unknwon for HTML5, therefore discouraged
#
# template::head::add_meta \
# -content "text/css" \
# -http_equiv "Content-Style-Type"
# template::head::add_meta \
# -content "text/javascript" \
# -http_equiv "Content-Script-Type"
# Determine if we should be displaying the translation UI
#
if {[lang::util::translator_mode_p]} {
template::add_footer -src "/packages/acs-lang/lib/messages-to-translate"
}
# Determine if developer support is installed and enabled
#
if {[llength [info commands ::ds_show_p]] == 1 && [ds_show_p]} {
template::head::add_css \
-href "/resources/acs-developer-support/acs-developer-support.css" \
-media "all"
template::add_header -src "/packages/acs-developer-support/lib/toolbar"
template::add_footer -src "/packages/acs-developer-support/lib/footer"
}
if {[info exists focus] && $focus ne ""} {
#
# Handle only values of focus where the provided name contains a
# dot.
#
if { [regexp {^([^.]*)\.(.*)$} $focus match form_name element_name] } {
set focus_script {
function acs_Focus(form_name, element_name) {
if (document.forms == null) return;
if (document.forms[form_name] == null) return;
if (document.forms[form_name].elements[element_name] == null) return;
if (document.forms[form_name].elements[element_name].type == 'hidden') return;
document.forms[form_name].elements[element_name].focus();
};
}
append focus_script "acs_Focus('${form_name}', '${element_name}');\n"
template::add_body_script -script $focus_script
} else {
ns_log warning "blank-master: variable focus has invalid value '$focus'"
}
}
#
# Retrieve headers and footers
#
set header [template::get_header_html]
set footer [template::get_footer_html]
#
# Body event handlers are converted into body_scripts
#
template::get_body_event_handlers
#
# Build multirows: this has to be done after get_body_event_handlers
# to include these body_scripts as well.
#
template::head::prepare_multirows
#
# Add the content security policy. Since this is the blank master, we
# are defensive and check, if the system has already support for it
# via the CSPEnabledP kernel parameter. Otherwise users would be
# blocked out.
#
if {[parameter::get -parameter CSPEnabledP -package_id [ad_acs_kernel_id] -default 0]
&& [info commands ::security::csp::render] ne ""
} {
set csp [::security::csp::render]
if {$csp ne ""} {
set ua [ns_set iget [ns_conn headers] user-agent]
if {[regexp {Trident/.*rv:([0-9]{1,}[\.0-9]{0,})} $ua]} {
set field X-Content-Security-Policy
} else {
set field Content-Security-Policy
}
ns_set put [ns_conn outputheaders] $field $csp
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
server busy placeholder
\ No newline at end of file
error placeholder
\ No newline at end of file
File not found.
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
This html page will be displayed instead of the standard OpenACS error message
if there is a database failure. Customize at your will, and don't forget to
update the contact address below!
When you are finished customizing it you need to enable it by renaming
it from 'www/global/site-failure.html.disabled' to
'www/global/site-failure.html'.
Note that some broken IE browsers might show a 'friendly' error
message instead if this file does not exceed 500 bytes.
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15">
<title></title>
</head>
<body>
<h1>Site Failure</h1>
<hr>
This site is currently not working due to a technical problem.
<p>
Please contact <a href="mailto:admin@example.com">admin@example.com</a> if you think
the problem is not known yet.
<hr>
</body>
</html>
<%= [im_header -loginpage $page_title] %>
<%= [im_navbar -loginpage_p 1] %>
<!-- <link rel="stylesheet" type="text/css" href="index.css" media="all"> -->
<script type="text/javascript">
// Set a specific image src
function setImage (id,img) {
var element = document.getElementById(id);
element.src = img;
var loginEl = document.getElementById("login-table");
loginEl.style.borderWidth="0px";
}
// Write the email/pwd into the OpenACS login area
function setCredentials (email, password) {
var emailEl = document.getElementById("email");
var pwdEl = document.getElementById("password");
emailEl.value = email;
pwdEl.value = password;
var loginEl = document.getElementById("login-table");
loginEl.style.borderWidth="5px";
loginEl.style.borderColor="#F00";
loginEl.style.borderStyle="solid";
$('html, body').animate({ scrollTop: 0 }, 'fast');
document.getElementById('login').submit();
}
</script>
<div id="slave">
<div id="fullwidth-list-no-side-bar" class="fullwidth-list-no-side-bar" style="visibility: visible;">
<if @cnt@ gt 1>
<table width=100% cellspacing=0 cellpadding=0>
<tr vAlign="top">
<td width="50%">
<div style="text-align: left">
<h2>Please select one of the demo accounts</h2>
<p>
The users belong to different groups and have different permissions. <br>
Please choose "System Administrators" for maximum permissions.
</p>
<br>
</div>
<table border=0 bordercolor=red><tr><td>
<multiple name=users>
@users.before_html;noquote@
<table border="0" cellpadding="0" cellspacing="0" style="cursor:pointer"><colgroup><col width="80px"><col width="230px"></colgroup>
<tr class="off"
onmouseover="this.className='on';setImage('@users.lower_name@', '/intranet/images/demoserver/@users.lower_name@.jpg')"
onmouseout="this.className='off';setImage('@users.lower_name@','/intranet/images/demoserver/@users.lower_name@_bw.jpg')"
onclick="setCredentials('@users.email@', '@users.demo_password@')"
>
<td><img id="@users.lower_name@" src="/intranet/images/demoserver/@users.lower_name@_bw.jpg"></td>
<td>
<b>@users.user_name@</b><br>
<nobr>Group: @users.demo_group@<br>
<nobr>Login: @users.email@</nobr><br>
<nobr>Password: @users.demo_password@</nobr><br>
</td>
</tr>
</table>
@users.after_html;noquote@
</multiple>
</table>
</td>
<td width="50%">
</if>
<table cellSpacing=1 cellPadding=1 border="0">
<tr>
<td class=tableheader><b>Intranet Login</b></td>
</tr>
<tr>
<td class=tablebody>
<table id="login-table" border=0><tr><td>
<include src="/packages/acs-subsite/lib/login" return_url="@return_url;noquote@" no_frame_p="1" authority_id="@authority_id@" username="@username;noquote@" email="@email;noquote@" &="__adp_properties"/>
</td></tr></table>
</td>
</tr>
<tr><td>
<font color=red>
&nbsp;<br>
Please select one of the demo accounts from the left hand side<br>
and click on the "Log In" button.<br>
</font>
</td></tr>
</table>
<br>&nbsp;<br>
<if @cnt@ gt 1>
<table cellSpacing=1 cellPadding=1 border="0">
<tr><td colspan="2" class=tableheader><b>Browser URL</b></td></tr>
<tr>
<td class=tablebody>Browser URL</td>
<td class=tablebody><%= $url %></td>
</tr>
<tr>
<td colspan="2" class=tablebody><small>
Please enter this URL into the browser on your desktop computer<br>
in order to access the application.
</small></td>
</tr>
</table>
<br>&nbsp;<br>
<table cellSpacing=1 cellPadding=1 border="0">
<tr><td colspan="2" class=tableheader><b>System Parameters</b></td></tr>
<tr>
<td class=tablebody>IP-Address</td>
<td class=tablebody><%= $ip_address %></td>
</tr>
<tr>
<td colspan="2" class=tablebody><small>
This is the IP address that this Virtual Machine has obtained automatically via DHCP.
</small></td>
</tr>
<tr>
<td class=tablebody>Total Memory</td>
<td class=tablebody><%= $total_memory %> MByte</td>
</tr>
<tr>
<td colspan="2" class=tablebody><small>
The total memory of the server.<br>
We recommend atleast 1024 MByte for a production server.
</small></td>
</tr>
</table>
<td>
</tr>
</table>
</if>
</div>
</div>
<%= [im_footer] %>
ad_page_contract {
Prompt the user for email and password.
@cvs-id $Id: index.vmware-ajax.tcl,v 1.5 2017/04/13 10:43:59 cvs Exp $
} {
{authority_id ""}
{username ""}
{email ""}
{return_url "/intranet/"}
}
set email_org $email
set username_org $username
set page_title "V[string range [im_core_version] 0 5]"
# ------------------------------------------------------
# Multirow
# Users defined in the database
# ------------------------------------------------------
set query "
select u.user_id,
pa.email,
p.person_id as sort_order,
p.demo_password,
p.demo_group,
p.demo_sort_order,
im_name_from_user_id(p.person_id) as user_name,
lower(replace(im_name_from_user_id(p.person_id), ' ', '_')) as lower_name
from persons p,
parties pa,
users u
where p.person_id = pa.party_id
and p.person_id = u.user_id
and demo_password is not null
order by
p.demo_group,
u.user_id
LIMIT 20
"
set last_group ""
set last_group_count 0
set cnt 0
db_multirow -extend {before_html after_html} users users_query $query {
set after_html ""
set before_html "</td><td>"
if {$last_group_count >= 2} {
set before_html "</td></tr><tr><td>"
set last_group_count 0
}
if {$demo_group ne $last_group} {
switch $demo_group {
Accounting { set group_comment "Accounting - Financial permissions" }
Administrators { set group_comment "Administrators - Maximum permissions" }
Customers { set group_comment "Customers - Can only see their stuff" }
Employees { set group_comment "Employees - Normal permissions" }
Freelancers { set group_comment "Freelancers - Can only see their stuff" }
"Project Mangers" { set group_comment "Project Managers - Creating projects" }
"Senior Managers" { set group_comment "Senior Managers - All permissions except admin" }
Sales { set group_comment "Sales - Permissions on presales pipeline" }
default { set group_comment $demo_group }
}
set before_html "</td></tr></table>"
append before_html "<br>&nbsp;<br><h1>$group_comment</h1>"
append before_html "<table border=0 bordercolor=red><tr><td>"
set last_group_count 0
}
incr last_group_count
set last_group $demo_group
incr cnt
}
# ------------------------------------------------------
# Get current user email
set current_user_id [ad_conn untrusted_user_id]
set username $username_org
set email $email_org
if {"" == $email} {
set email [db_string email "select email from parties where party_id = :current_user_id and party_id > 0" -default ""]
}
if {"" == $username} {
set username [db_string username "select username from users where user_id = :current_user_id and user_id > 0" -default ""]
}
if {0 eq $current_user_id} {
set email " "
set username " "
}
# ------------------------------------------------------
# Gather some information about the current system
set ip_mac [im_system_ip_mac_address]
set ip_address [lindex $ip_mac 0]
set mac_address [lindex $ip_mac 1]
set total_memory [im_system_memory]
if {"" ne $total_memory} { set total_memory [expr round($total_memory / 1024.0)] }
set url "<a href=\"http://$ip_address/\" target=_new>http://$ip_address/</a>\n"
set debug ""
set result ""
set header_vars [ns_conn headers]
for { set i 0 } { $i < [ns_set size $header_vars] } { incr i } {
set key [ns_set key $header_vars $i]
set val [ns_set value $header_vars $i]
append debug "<tr><td>$key</td><td>$val</td></tr>\n"
if {"Cookie" == $key} { continue }
if {"Connection" == $key} { continue }
if {"Cache-Control" == $key} { continue }
if {"User-Agent" == $key} { continue }
if {[regexp {^Accept} $key match]} { continue }
append result "<tr><td>$key</td><td>$val</td></tr>\n"
}
User-agent: *
Disallow: /doc/
Disallow: /api-doc/
Disallow: /register
Disallow: /register/
Disallow: /comments/
Disallow: /notifications/
Disallow: /test/
Disallow: /workflow/
Disallow: /acs-service-contract/
Disallow: /acs-lang/
Disallow: /acs-admin/
Disallow: /RPC2/
# googlebot knows wildcards so block all register
User-agent: googlebot
Disallow: /doc/
Disallow: /api-doc/
Disallow: /register
Disallow: /register/
Disallow: /*/register
Disallow: /*/register/
Disallow: /comments/
Disallow: /notifications/
Disallow: /test/
Disallow: /workflow/
Disallow: /acs-service-contract/
Disallow: /acs-lang/
Disallow: /acs-admin/
Disallow: /RPC2/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment