Code Search for Developers
 
 
  

chat_createchatroom.php from Group-Office groupware at Krugle


Show chat_createchatroom.php syntax highlighted

<?php
  //createchatroom
  $name = $_GET["name"];
  $thema = $_GET["thema"];
  $userid = $_GET["userid"];
  $username = $_GET["username"];
  $password = $_GET["password"];

  if ($name && $thema && $userid && $username) {
    //check lengths and qality
    $name = str_replace("'", "\\'", $name);
    $thema = str_replace("'", "\\'", $thema);
    $username = str_replace("'", "\\'", $username);
    if (strlen($name) > 20) $name = substr($name, 0, 20);
    if (strlen($username) > 20) $username = substr($username, 0, 20);

    query("delete from chat_chatrooms where fromuser=$userid");

    $now = time();
    query("insert into chat_chatrooms (id, created, name, thema, fromuser, fromusername, password) values (".(($CONNECTION == "pgsql")?("nextval('chat_chatrooms_sequence')"):("''")).", $now, '$name', '$thema', $userid, '$username', '$password')");

    $result = query("select id from chat_chatrooms where name='$name' and created=$now");
    if ($result) {
      if ($row = fetch_object($result)) {
        echo $row->id;
      }
      else echo "0";
    }
    else echo "0";
  }




See more files for this project here

Group-Office groupware

Group-Office is a powerfull modular Internet/Intranet application framework. It features calendaring, project management, e-mail, tasks, addressbook, file management.

Project homepage: http://sourceforge.net/projects/group-office
Programming language(s): JavaScript,Pascal,PHP
License: other

  language/
    de.inc
    en.inc
    fr.inc
    hu.inc
    nl.inc
  sql/
    chat.install.sql
    chat.uninstall.sql
  buttons.gif
  chat.php
  chat_addmessage.php
  chat_adduser.php
  chat_createchatroom.php
  chat_deletechatroom.php
  chat_disconnect.php
  chat_getchatrooms.php
  chat_getmessages.php
  chat_getusers.php
  chat_login.php
  config.php
  index.php
  justchat.jar
  media.cfg
  menu_chat.png
  module.info
  newmessage.au
  newuser.au
  skinimage0.gif
  skinimage1.gif
  skinimage2.gif
  skinimage3.gif
  skinimage4.gif