Jump to content

Racc

Members
  • Posts

    35
  • Joined

  • Last visited

    Never

Posts posted by Racc

  1. I'm not exactly sure if I understand what you're trying to do here, but it would really depend on your del_news.php file's code. The code you are showing us seems to just display the buttons for editing/deleting the entries, but none of the code to actually do the editing or processing of it. Maybe you can show us del_news.php, or maybe I'm just not understanding this well?

     

    basically, all of my links are

     

    http://localhost/?s=links

    http://localhost/?s=downloads

    etc

     

    I normally the link to delete a post contains a variable.  I'm unsure on how to do that.  This is how it normally would be.

     

    http://localhost/include/delete_news.php?id='.$row['id']

     

    IE:

    http://localhost/include/delete_news.php?id=1

    http://localhost/include/delete_news.php?id=2

    http://localhost/include/delete_news.php?id= *ETC*

     

    Since I change all my links to "s?=NAME" it will not work correctly.  How do I adjust the lines:

     

    while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
    echo '<tr>
    <td>'.$row['id'].'</td>
    <td>'.$row['title'].'</td>
    <td><a href="include/delete_news.php?id='.$row['id'].'">Delete</a></td>
    <td><a href="include/edit_news.php?id='.$row['id'].'">Edit
    </tr>';

     

    To acomidate how my links are done.  thanks, any help is appreciated.

     

     

  2. I can't edit or del the news I have posted.

     

    <?php session_start();
    ob_start();
    if (isset($_GET['s']))
    $s = $_GET['s'];
    else
    $s = "main";
    include("include/container.php");
    include("include/header.php");
    include("include/nav.php");
    ?>
    <link rel="stylesheet" type="text/css" href="style.css" media="screen"></head>
    <title>Racc</title>
    <div id="content">
    <?php
    if ($s == "main") {
    include("include/news.php");
    } else if ($s == "blog") {
    include("include/blog.php");
    } /*lololol admin stuff*/
      else if ($s == "admincp") {
    include("include/admincp.php");
    } /*lololol newsmanaging*/
      else if ($s == "newsmanage") {
    include("include/admincp/news_manage.php");
    } else if ($s == "addnews") {
    include("include/admincp/addnews.php");
    } /* lololol blogmanaging*/
      else if ($s == "blogmanage") {
    include("include/admincp/blog_manage.php");
    } else if ($s == "addblog") {
    include("include/admincp/addblog.php");
    }
    /*lololol end admin stuff*/
      else if ($s == "logout") {
    include("include/process.php");
    } else if ($s == "downloads") {
    include("include/downloads.php");
    } else if ($s == "tutorials") {
    include("include/tutorials.php");
    } else if ($s == "author") {
    include("include/author.php");
    } else if ($s == "links") {
    include("include/links.php");
    } else if ($s == "comments") {
    include("include/comments.php");
    }	else {
    echo "<p class=\"error\">The section $s does not exist!</p>\n";
    }
    ?>
    </div>
    </body>
    </html>
    <?php
    ob_end_flush();
    ?>

     

    That's my index, that's how I do my links.

     

    <?php
    include('include/session.php');
    if(!isset($_SESSION['userid'])){
    ?>
    <br><br>
    <form action="include/process.php" method="POST">
    Username:<input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"></td><td><? echo $form->error("user"); ?></td></tr><BR>
    Password:<input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td><td><? echo $form->error("pass"); ?></td></tr>
    <input type="hidden" name="sublogin" value="1">
    <br>
    <input type="submit" value="Login"></td></tr>
    </form>
    <?php
    }else{
    $query = "SELECT id, title FROM blog_posts";
    $result = @mysql_query($query);
    
    if ($result) {
    echo '<div align="center">
    <table border="0">
    <tr>
    <td><b>ID</b></td>
    <td><b>Title</b></td>
    <td><b>Delete</b></td>
    <td><b>Edit</b></td>
    </tr>';
    
    while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
    echo '<tr>
    <td>'.$row['id'].'</td>
    <td>'.$row['title'].'</td>
    <td><a href="include/delete_news.php?id='.$row['id'].'">Delete</a></td>
    <td><a href="include/edit_news.php?id='.$row['id'].'">Edit
    </tr>';
    }
    } else {
    echo 'Sorry, but we could not retrieve any blogroggoring records.';
    }
    echo '<a href="?s=addblog" title="addblog" id="addblog"><span>Add Blog</span></a>';
    }
    ?>

     

    That's for the bloggroggering section, that's how it would normally work. How would I change it to start using my link system. (I'm sorry if none of this is clear, i'm hopped up on cold medication and i'm insanely sick. :< )

  3. This is a very broad question. Basically you would have to restrict access to certain pages and features based on the security level of the user.

     

    On each page you would need to check their security level, and then only display the things that they should have access to.

     

    Not sure if that answers your question or not. Try to be less vague and we may be able to help more.

     

    Yeah. =D

  4. I have a little cms that's not protected (sites not out yet, so no worries =D).  But from it you can add news, edit news, and soon you can add tutorials, links etc.  I only want admin access for it.  How would I secure it?  I did make security levels for users, if I incorporated that would it be insecure?

     

    Any help would be appreciated. =D

  5. This should work...

     

    Note: make sure you change the commentid=ID

    to suit the coding in the Comments page ie, the

    SQL Syntax would be $_GET['commentid'];

     

    if ($result) {
    while ($row = mysql_fetch_array($result)) {
    $url = "index.php?s=comments&commentid=".$row['id'];
    echo "<p><b>".$row['title']."</b><br />
    ".$row['sd']."<br />
    Posted by : <b>".$row['author']."</b><br />
    ".$row['post']."<br />
    <a href=\"javascript:openComments('".$url."')\">
    <a href=\"".$url."\" title=\"comments\" id=\"comments\"><span>Comments</span></a></a></p>";

     

     

    Thanks!  :D

     

    More importantly, thank you everyone.

  6. I like the design but you should load everything into the index.  And the index will contain the header,footer,left column, then when you click something it loading the section in index to a different page.  It'll cut the load time abit and just make it nicer.

     

    Also use CSS for the image ontop and have it in the background.  I'm obsessed with having the header in the background.  :D

     

    VBnet/tutorials.html = broken link

    User credentials are sent in clear text around 20 times.

    Trace method is enabled on your server which leads to ARP posioning.

     

    You might wanna talk to your host about the trace method and fix the link.  The credential thing is no biggie, it's a pretty low security risk most sites do have the credentials being sent in clear text.

  7. Basically I have a comment system on posts.  When I try opening it I get an error (no thread selected) Which the link should be "http://localhost/index.php?s=comments=1"  Now the 1 is '.$url'.

     

    I define the URL by using this...

     

    if ($result) {
    while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
    $url = 'index.php?s=comments='.$row['id'];
    echo '<p><b>'.$row['title'].'</b><br />
    '.$row['sd'].'<br />
    Posted by : <b>'.$row['author'].'</b><br />
    '.$row['post'].'<br />
    <a href="javascript:openComments(\''.$url.'\')">
    <a href=\''.$url.'\' title="comments" id="comments"><span>Comments</span></a></a></p>';

     

    So how would I change the index to accomidate that?  The index is what defines what the URL is linked to.

     

    <?php
    if ($s == "main") {
    include("include/news.php");
    } else if ($s == "login") {
    include("include/login.php");
    } else if ($s == "logout") {
    include("include/process.php");
    } else if ($s == "register") {
    include("include/register.php");
    } else if ($s == "profile") {
    include("include/userinfo.php");
    } else if ($s == "comments") {
    include("include/comments.php");
    } else if ($s == "admin") {
    include("include/addnews.php");
    } else if ($s == "downloads") {
    include("include/downloads.php");
    } else if ($s == "tutorials") {
    include("include/tutorials.php");
    } else if ($s == "author") {
    include("include/author.php");
    } else if ($s == "links") {
    include("include/links.php");
    }	else {
    echo "<p class=\"error\">The section $s does not exist!</p>\n";
    }
    ?>

     

    Thanks, I'm sure it's really easy, i'm beating myself up over this.

  8. I'm not impressed.  That can be faked.  Just get a photo, catoonize it, hit the record button and tear it down, line by line until there's nothing left.  Then reverse the recording, and voila, you've got the effect of drawing it.

     

    Due to the amount of shaping and re-shaping he does, I doubt it.  But who knows.

  9. [quote author=Jenk link=topic=124711.msg522450#msg522450 date=1170755426]
    If you are going to cling onto the point about arabic writing, you may as well just give up now. It's a minor point at best.

    Besides which, no where does he state he wants to have right to left reading, all he has simply asked is which side of the screen do we prefer the navigation menu/bar to be on when browsing.
    [/quote]

    Indeed we were going off topic.

    Depends on how the layout looks with it, it all needs to flow.
  10. Nice looking site, but is that phpBB your're running?  If so, you should add back the "Powered by phpBB © 2001, 2003 phpBB Group" footer line....it is considered a requirement, and I believe it's the least you can do to pay back for all the coding time that went into providing you with free software.

     

    Oh yeah, I removed that a bit back to prove to them that file extensions meant nothing. They were claiming that any file that ended with ".php" was a php file, and that nothing else would be php, or nothing else could use the php extension. If the person saw the phpBB it would be a dead giveaway. I'll be adding that back in when I get home later.

     

    As for the note about phpBB being garbage, have you taken a look into phpBB3? It's got file attachments built-in, along with most of the majorly used mods out there, and a ton of extra performance and security. I'm planning on upgrading as soon as it releases.

     

    I'm also going to be modifying my board to stop the spam accounts using a few of my own human checking methods (not generic CAPTCHAs, i.e. text/numbers in image).

     

    Oddly enough i have a checkbox for "are you human?"  I also have advanced image verification.  Still spam got though.

  11. [quote author=Jenk link=topic=124711.msg522434#msg522434 date=1170754180]
    It might not be the minority.. his site may be niched for the Arabic user base, or, he is maintaining a multi-lingual site.

    Another option is to let the user choose, via an option in the "control panel." Simply have two (or more) CSS stylesheets, and an option to choose them.
    [/quote]

    Yes, but if it's english why would this even matter? English is read from left to right, top to bottom.  He seems to speak English quite well I doubt it's majority Arabic.

    Good idea on the control panel.  Maybe add an option on registration aswell?
  12. know what that says to me?  to much time on his hands.

     

    Says the admin of a webdesign forum...

     

    I was going to say that many people would say exactly that, but didn't think it would come from any of our own members... :)

     

    Not that there's anything wrong with this, him saying that only made him injudicious.  Maybe that's his profession, maybe it's part of his job, rather then "too much time on his hands".

  13. It's okay.  The colours aren't good, the blue is a tad dark my eyes are crying.  :( if you have a chacter in your banner match the colours, the way it currently is the banner looks out of place.

     

    Nice job combining the forum with the original site.

     

    Nice looking site, but is that phpBB your're running?  If so, you should add back the "Powered by phpBB © 2001, 2003 phpBB Group" footer line....it is considered a requirement, and I believe it's the least you can do to pay back for all the coding time that went into providing you with free software.

     

    Phpbb isn't good enough to be noted in anything, it's garbage.  There's holes and the convience factor is poor, you can't even use attachments untill you write a mod for it.  You will also get around 5 spam accounts signing up daily.  GG phpbb.

     

    I've used, SMF, php-fusion, phpbb, and Vbulletin.

     

    php-fusion - holey as shit.

    phpbb - moderate with holes, poor functunability. (is that a word?)

    SMF - Not too bad, but still in early stages, a few areas are shadey.

    Vbulletin - the best out there that i've used.  Unlike fusion and SMF this one ran nicely with around 3.5k users.

  14. Oddly enough I cannot edit my post anymore, the forum will not allow me to. O_O  Either way, I deleted line 82, just for kicks.  It worked! No error...but the redirection obviously doesn't work. I'll have to work on that. =P

     

    Thanks for all your help, as far as i'm concered you did your job helping me, i'll set this as case solved or whatever.  If you have any suggestions on the other part just send me a message or whatever.

     

    EDIT:

     

    (2:34:16 AM) Racc: =P

    (2:36:01 AM) Racc: I LOVE YOU!

     

    Thanks for the help, much apprietiated

  15. session_start() must be at the very top of your page, right below <?php no whitespaces.

     

    and sorry if this is stupid and you answered it in that post but whats this code:

    2: <?php
    3: if (isset($_GET['s']))
    4:	$s = $_GET['s'];
    5: else
    6:	$s = "main";
    7:	include("container.php");
    8:	include("header.php");
    9:	include("nav.php");
    10: ?>
    

     

    That would be my index.  line: 2 ~ 10.  Or are you asking what all it does? (which is quite odd sense you seem to know what you're doing.)

     

    EDIT: almost there, I can now login, register and logout...sorta. =P  The logout page gives and error but logs out anyway.

     

    Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\container.php:1) in C:\xampp\htdocs\process.php on line 82

     

    I'm still playing aroudn with it, I'm so close. O_O

  16. eek, sorry i didnt see the post above. :)

     

    anyways. so $session is your class, could you please search the class for a function called login. or just attach the file which contains the class $session.

    thanks.

     

    It's okay, I just got a little frustrated when I saw "Hey idiot I told you!"

     

    I switched a few things around, I now have new errors. =| I made login.php, process.php, and register.php all include "include("include/session.php");" rather then including it in the index.php.  I now get this error when I click "login.php" and when I click "Register.php".

     

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\index.php:2) in C:\xampp\htdocs\include\session.php on line 46

     

    And I will include the index.php line 2 ~ 10ish. and Will include session.php line 46.

     

    46:      session_start();   //Tell PHP to start the session

     

    and

    2: <?php
    3: if (isset($_GET['s']))
    4:	$s = $_GET['s'];
    5: else
    6:	$s = "main";
    7:	include("container.php");
    8:	include("header.php");
    9:	include("nav.php");
    10: ?>

  17. hmm.

     

    When I try logging in I get this.

     

    Fatal error: Call to a member function login() on a non-object in C:\xampp\htdocs\process.php on line 60

     

    Then I go to line 60..

     

        $retval = $session->login($_POST['user'], $_POST['pass'], isset($_POST['remember']));

     

    And pardon my language.  You know, I could be a jerk because you were rude for NO reason.  "What's in line 60!?"  ::)

     

    And yes it exists.

  18. Made2own.com is one to stay away from, they terminiated my years worth of account because I was getting too much traffic (rather then discussing it).  Not only that but they are VERY unsecure, recursive lookup enabled which leads to DNS poisoning.  I told them that, they called me in not so many words, stupid.  They got hacked two months later, I asked them about it they told me they got dns poisoned.

     

    Their support sucks and they act like all customers are idiots.  made2own.com = bad!

  19. Actually I think this guy is better. =P

    yeah in some ways i'd agree, but it's a different genre altogether - so probably sidewards comparable rather than better/worse.

     

    if you like the whole acoustic tapping thing, then this guy, Erik Mongrain, really is amazing:

     

     

    similar style to the one you posted.

     

    True to that.  That guys is very good aswell, finger tapping can be so amazing.  :)

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.