Jump to content

Kirasiris

Members
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Kirasiris

  • Rank
    Member
  1. Yes, that's the actual problem. I'm trying to create a system in which both users should acknowledge the friendship between them but so far I can not figure out the proper way to implement it. I know it may be a bit complex but should it not be possible by just making a X user update an specific row without having to create another relationship? I mean your suggested task (the second one; "set the follow request from User B -> User A as accepted") requires me to create a function to set the request from User B to accepted and that should work as I want.... but it is not what I just tri
  2. I'm working with a relationship table: id (AI), user_id, friend_id, status, type. The current behavior is that the Logged In user can send friendship requests to X user but if there is already a friendship request coming from the X user to the Logged In user; the logged in user instead of sending a new request to X user, he/she should accept the one that is already in the database(which is coming from the X-user). Here is an image of what I'm talking about(in the image, the status column displays 'accepted' but try to imagine it as it was 'pending', please) : So
  3. FIRST OF ALL , THIS POST IS GOING TO BE LONG. Thanks for helping. Hello I'm trying to build an "really" advanced search page for my WordPress template. So far I have created the my page with the following code: <?php /* Template Name: Direcotorio Template Post Type: page */ ?> <?php get_header(); ?> <div class="container"> <div class="row"> <div id="my-adv-search"> <!-- Post Type --> <div class="col-md-3"> <div class="form-group"> <label for="q_post_type">Tipo</label> <select clas
  4. I'm sorry if did not explain myself clearly enough. What I want is to find a correct way to create a many-to-many relationship table as I'm building a CMS similar to WordPress(in fact I have those three tables exactly as the ones WordPress uses). I'm trying to build a simple blog system in which I need to display all the categories related to any single post and when clicking on them(on the categories) being able to redirect the user to a page displaying all the post which contain that specific category(the "clicked" one).. I don't know if I explained it better but in few words I'm just bu
  5. So I've been struggling with this for quite a while now and is already my last step to get done with my project(finally). The main problem is that I'm trying to create a many-to-many relationship between three tables that I have on my database. I'm attaching the table that I'm using on this post (ci_terms, ci_terms_taxonomy, ci_terms_relationship). So far the main code works great(the one for adding the post, which I will post the whole code after explaining what I'm trying to do). When adding a post everything works as I want except when I try to select the categories(not the selectio
  6. Hello, so I've been trying to use Select 2 in the AdminLTE template with a function in javascript to add dynamic data. Here is my view in which I'm using a form_input with a class of select2.: <div class="form-group"> <?php echo form_label('Skills', 'skills'); ?> <div class="input-group date"><div class="input-group-addon"><i class="fa fa-star" aria-hidden="true"></i></div> <?php $data = array( 'name' => 'skills',
  7. Hello, I've been working on a login system in which the function will check if three values on my database are equal to TRUE(1) or FALSE(0). So far I have an user account with the three values set to true so it should allow me to log in and redirect to the admin page but it does not. Can somebody help me with this, is there an error that I may be missing? public function admin_login(){ //Check if logged in $this->User_model->session_comprobate_admin(); //Set rules $this->form_validation->set_rules('username', 'Username', 'trim|required|min_length[4]'); $t
  8. Hey, sorry for the late answer, but I already fixed it, I just created controller/models for my user database table, and I gave permissions to users according to the status of their account. Example 1:regular user 2:moderator 3:author 4:admin I did something like that, but thanks for trying to help me .
  9. The thing is that I never created a login page, or anything like that. So my website is completely done, is finally ready to be published, but the only thing that I need now, is the blocking of the admin pages to the public. I have a controller called Admin in which I have all the function and pages of "admin" , here is my controller.(all ths needs to be blocked) <?php class Admin extends CI_Controller { public function __construct() { parent::__construct(); $this->load->model('about_model'); $this->load->model('blog_model'); $this->load->model('categorias_model'); $
  10. Hello I've been trying to fix this problem for around 3 weeks; so what I want is to be able to send a picture and being able to display it in another page. It send it to the server, but still it doesn't show it. Here is my code: <?php require_once('../Connections/connection.php'); ?> <?php $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "add_post")) { $tiempocotejo= time(); $insertSQL = sprintf("INSERT INTO posts (
×
×
  • 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.