Changeset 86 for trunk/admin

Show
Ignore:
Timestamp:
04/02/06 20:43:37 (3 years ago)
Author:
michiel
Message:

When author is logged in, use their info as
default comment info.
Fixes #42

Also get rid of some warnings in the admin interface
introduced by the new plugin system. This should be fixed
the right way, but this way we can work with it on our live server.

Location:
trunk/admin
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/admin/index.php

    r83 r86  
    1717 */ 
    1818 
     19$adminmode = 1; 
    1920require("../common/functions_blog.php"); 
    2021//----------------------------- 
     
    705706                                        <td><input type="text" name="author[email]" value="<?=$author["email"]?>" /></td> 
    706707                                </tr><tr> 
     708                                        <td align="right">website:</td> 
     709                                        <td><input type="text" name="author[website]" value="<?=$author["website"]?>" /></td> 
     710                                </tr><tr> 
    707711                                        <td align="right">full name: </td> 
    708712                                        <td><input type="text" name="author[fullname]" value="<?=$author["fullname"]?>" /></td> 
     
    748752                        $query .= "\"fullname\"='".$author["fullname"]."'"; 
    749753                        $query .= ", \"email\"='".$author["email"]."'"; 
     754                        $query .= ", \"website\"='".$author["website"]."'"; 
    750755                        $query .= ", active = ".(int)$author["active"]; 
    751756                        if (trim($author["password"])) { 
     
    755760                } else { 
    756761                        if (trim($author["password"])) { 
    757                                 $query = "INSERT INTO authors (\"password\", \"fullname\", \"email\", \"login\", active) VALUES ('".trim($author["password"])."', "; 
     762                                $query = "INSERT INTO authors (\"password\", \"fullname\", \"email\", \"website\", \"login\", active) VALUES ('".trim($author["password"])."', "; 
    758763                        } else { 
    759                                 $query  = "INSERT INTO authors (\"fullname\", \"email\", \"login\", active) VALUES ("; 
     764                                $query  = "INSERT INTO authors (\"fullname\", \"email\", \"website\", \"login\", active) VALUES ("; 
    760765                        } 
    761766                        $query .= "'".$author["fullname"]."'"; 
    762767                        $query .= ", '".$author["email"]."'"; 
     768                        $query .= ", '".$author["website"]."'"; 
    763769                        $query .= ", '".$author["login"]."'"; 
    764770                        $query .= ", ".(int)$author["active"]; 
  • trunk/admin/login.php

    r83 r86  
    33 * MvBlog -- An open source no-noncence blogtool 
    44 * 
    5  * Copyright (C) 2005, Michiel van Baak 
     5 * Copyright (C) 2005-2006, Michiel van Baak 
    66 * Logo design (C) 2005, Sofie van Tendeloo 
    77 * 
     
    1616 * at the top of the source tree. 
    1717 */ 
    18  
     18$adminmode = 1; 
    1919require("../common/functions_blog.php"); 
    2020 
     
    5959                $_SESSION["author_fullname"] = $row["fullname"]; 
    6060                $_SESSION["author_email"]    = $row["email"]; 
     61                $_SESSION["author_website"]  = $row["website"]; 
    6162                header("Location: index.php"); 
    6263        } else {