Jump to content

bokivaol

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Posts posted by bokivaol

  1. Hello comrades,

     

    I expect my website in next 1-2 months. Website will be developed in CAKEPHP.

     

    I assume that almost all are already registered on many freelance websites. My website will be something like freelancer[dot]com. If you are member of this website you already know how the payment works.

     

    Maybe I am wrong in some details what I am going to explain, but you will conclude what I want.

     

    Sorry for long explanation, but I would like to explain you what I need.

     

    There are will be 2 types of costumers, one who offer work (employer) and second is costumer who wants to earn money (employee).

     

    What I want is next:

    When employer comes to my website and when he wants to add credits(virtual money) to his account (on my website), he has to click on "Pay" (or something like that) button and after that he will be redirected on 2CO website. He don't have to have account on 2CO to pay, as far as I know. When he pay, I think that he has to get confirmation email and link where he has to confirm that he wants to pay.  When he confirms that he wants to pay some amount of money, that money will be transferred on my 2CO account (website owners account on 2CO).

    The main think that I want is, when he confirm that payment, money goes to my 2CO account, but credit (virtual money) which is equal to the payed amount of money has to be automatically added on his account on my website and he could see that he has credit on his account. It means that as soon as he confirm payment, he will get his credit on his account on my website, and he could  post the job immediately. I don't want to do it manually. If it is manually, that means that someone has to be 24/7/365 online and awake to add credits on employer accounts, who confirmed payments. That is exhausting and meaningless job, if you agree.

     

    Can it be done to be automatically, as I described.

     

    If anyone can do this, please send me PM with price, but please be sure that you understand what I want.

  2. Maybe it is easy for you, but for me it is very hard. I tried with

    SELECT newsletter.email, user_registration.email FROM user_registration LEFT JOIN newsletter ON newsletter.email <> user_registration.email

    , but I need function IF and THEN. IF they are = THEN display just ONE of them, all other different emails should be displayed.

  3. What is command to connect two tables from the database. I would like to select from table "newsletter" all emails which are different AND  to select from the table "user_registration" all users with newsletter=1, but if there any user in those two tables with the same email, I would not like to display it twice.

    When I put in the code

    $s = dbQuery("select * from `newsletter` where `email`<>'' order by `email`");

    - it display all different emails from the table "newsletter"

    When I put in the code

    $s = dbQuery("select * from `user_registration` where `newsletter`='1' order by `email`");

    - it display all emails from the table "user_registration" with newsletter=1.

    I would like to connect these two equations, but I don't know how, I don't know what is command? Can you help me about this? I used JOIN command, but I didn't do anything.

     

    <?php
            $s = dbQuery("select * from `user_registration` where `newsletter`='1' order by `email`");........1        
            /* $s = dbQuery("select * from `newsletter` where `email`<>'' order by `email`");........................2*/
            $count = dbNumRows($s);
            if($count>0){
            ?>
            <select size="6" multiple="multiple" id="multi" name="multi[]" style="width:200px;">
            <?php        
                while($t = dbFetchArray($s,MYSQL_BOTH))
                {    
            ?>
                <option value="<?php echo $t["id"]; ?>"><?php echo $t["email"]; ?></option>
            <?php
                }        
            ?>
            <?php
                }        
            ?>   
            </select>
            <input type="checkbox" onClick="selectAll(this);"/> Select All<br />
            <input type="submit" onclick="return checkdel();" name="DelUser" value="Delete Those Subscribers" />
            <?php
            }
            else
            {
            ?>
            No Records!
            <?php
            }        
            ?>

     

    Can anyone help me to write a code, I am not so good in mysql and php, but I know what I want.

     

    [attachment deleted by admin]

  4. Every time I got an error which is not connected with mysql database, but with added PHP code in the script above. Last error was "unexpected end". I know that most time it is because of "}", but I could not find that any } missing or is sinker. This script is OK, but when I add some code in it, it is always wrong. :( I need someone to add functions in the script which will insert to mysql database "jobs" STATUS=2 for Pause button and STATUS=1 for Run button . I lost my nerves  :'(. I know that it is easy for someone, but for me ...

  5. Hi guys!

    I need a little help in PHP. I need to put into the PHP code functions which will insert to mysql database "jobs" STATUS=2 for Pause button and STATUS=1 for Run button

     

    PHP code:

    <?php
    include("include/header.php");
    if(!isset($_SESSION["userlogin"])) { header("location: login.php"); exit(); }
    $edit=dbFetchArray(dbQuery("select * from `user_registration` where `email`='".$_SESSION["userlogin"]."'"),MYSQL_BOTH);
    $Id=base64_decode($_REQUEST['Id']);
    $up=mysql_fetch_array(mysql_query("select * from `jobs` where `id`='".$Id."'"));
    $status=stripslashes($up["highlighted"]);
    $name=stripslashes($up["title"]);
    $explode=explode(" ",$name);
    $tit=isset($explode[0])?$explode[0]:'';
    $col=isset($explode[1])?$explode[1]:'';
    $cat=isset($explode[2])?$explode[2]:'';
    
    $user=mysql_fetch_array(mysql_query("select * from `user_registration` where `email`='".$_SESSION["userlogin"]."'"));
    $fullname=stripslashes($user['fullname']);
    $customer_id=$user['id'];
    $current_balence=$user['current_balance'];
    
    if(isset($_POST["Button"])) {
        if(isset($_REQUEST["Available_positions"]))
        {
        $Available_positions=$_POST["Available_positions"];
        if(strpos($Available_positions,'.')===false) {
        $pos=$Available_positions;
        $pos1=0;
        } else {
        $pieces = explode(".", $Available_positions);
        $pos=$pieces[0];
        $pos1=$pieces[1];
        }
    
        $Payment_per_task=$_POST["Payment_per_task"];
    
        $hid=$_REQUEST['hid'];
        if($pos1>0)
        {
        ?>
        <script>
        alert('Job Posting Suspended');
        window.location.href="edit_job.php?Id=<?=base64_decode($hid)?>";
        </script>
        <?
        }
        else
        {
        dbQuery("update `jobs` set `wd2`='".$Available_positions."',`price`='".$Payment_per_task."' where `id`='".$hid."' and `email`='".$_SESSION["userlogin"]."'");
        ?>
        <script>
        window.location.href="employer.php";
        </script>
        <?
        }
        }
        $_SESSION['hid']=$hid;
        if($hid>0) {
        $_SESSION["success"]='';
        } else {
        $_SESSION["error"]='';
        }
    } else if(isset($_POST["Cancel"])) {
    $hid=$_REQUEST['hid'];
    dbQuery("update `jobs` set `status`='3' where `id`='".$hid."' and `email`='".$_SESSION["userlogin"]."'");
    $resJ=dbFetchArray(dbQuery("select * from `jobs` where `id`='".$hid."' and `email`='".$_SESSION["userlogin"]."'"),MYSQL_BOTH);
    
    if($resJ["wd1"]!=$resJ["wd2"]) {
    $CJ= $resJ["wd2"] - $resJ["wd1"];
    $CJFees = $CJ*$resJ["price"];
    dbQuery("insert into `myaccount`(`email`,`amount`,`type`,`createdate`,`jobid`) values('".$_SESSION['userlogin']."','$CJFees','10',NOW(),'".$resJ["id"]."')");
    $rescurbal=dbFetchArray(dbQuery("select * from `user_registration` where `email`='".$_SESSION['userlogin']."'"),MYSQL_BOTH);
    dbQuery("update `user_registration` set `current_balance`='".($rescurbal["current_balance"]+$CJFees)."' where `email`='".$_SESSION['userlogin']."'");
    }
    ?>
    <script>
    window.location.href="employer.php";
    </script>
    <?
    }
    ?>

    ...

    and the buttons code:

    ...

    <br><input type="submit" value="Submit Campaign" <?php if($up["status"]=='3') { echo 'disabled="disabled"';} ?> name="Button">  <input type="submit" value="Finished Campaign" <?php if($up["status"]=='3') { echo 'disabled="disabled"';} ?>  name="Cancel"><br />

    ...

     

    I tried to do that, but I always get some error :shrug:. Please help!

×
×
  • 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.