예제 #1
0
 function photo()
 {
     $objConfig = new config();
     $objCommon = new common();
     $this->domainPath = "http://" . $_SERVER['HTTP_HOST'] . "/";
     $this->fullPath = $_SERVER['DOCUMENT_ROOT'] . "/";
     $this->uploadDir = $_SERVER['DOCUMENT_ROOT'] . "/userimages/";
     $this->imageQuality = $objCommon->getConfigValue("imageQuality");
     $this->error = "";
     $this->mysql = new mysql();
 }
예제 #2
0
 function photo($files)
 {
     $objConfig = new config();
     $objCommon = new common();
     $this->domainPath = $objConfig->get_domain_path();
     $this->fullPath = $objConfig->get_full_domain_path();
     $this->uploadDir = $objConfig->get_upload_dir();
     $this->imageQuality = $objCommon->getConfigValue("imageQuality");
     $this->files = $files;
     $this->description = "";
     $this->fileType = "";
     $this->title = "";
     $this->tags = "";
 }
예제 #3
0
        echo "<td></tr>";
    }
    ?>
    
    <tr>
    <th>Upload Image File</th>
	<td><?php 
    unset($_SESSION['photofilename']);
    require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/flashupload.class.php";
    $uploadObj = new flashUpload('flashUpload');
    $uploadObj->redirectLink = "javascript:submitFormOnFloat(document.forms['frmPostRentOrHire']);";
    $uploadObj->uploadPath = "http://" . $_SERVER['HTTP_HOST'] . "/ajax/rentorhire/editpostrentorhire.php";
    $uploadObj->filetypedesc = "Image files";
    $uploadObj->vldnoblank = false;
    $objCommon = new common();
    $uploadObj->maxfilesize = $objCommon->getConfigValue("max_photo_upload_size");
    $uploadObj->writeCode();
    ?>
	</td>
    </tr>    
    
   </table>
	<div class="lineBreakBig"></div>
	<center><input type="submit" value="SUBMIT" class="bigButton width180"></center>
	<div class="lineBreakBig"></div>
  </form>
</div>
<!--<script>loadAjax('/ajax/project/subcategory.php?id=1','div_subcategory'); </script>
<script>loadAjax('/ajax/rentorhire/subcategory.php?id=1','div_subcategoryproduct'); </script>-->
<?php 
} else {
예제 #4
0
$uploadObj->redirectLink = "javascript:submitFormOnFloat(document.forms['frmPostProject']);";
$uploadObj->uploadPath = "http://" . $_SERVER['HTTP_HOST'] . "/ajax/project/postproject.php";
$uploadObj->filetypedesc = "All files";
$uploadObj->vldnoblank = false;
$objCommon = new common();
$uploadObj->maxfilesize = $objCommon->getConfigValue("max_file_upload_size");
$uploadObj->writeCode();
?>
</td>
      </tr>
      <tr>
        <th valign="top"><input type="checkbox" name="makeFeatured" id="makeFeatured" />
          <label for="makeFeatured"> Make Project Featured</label></th>
        <td><?php 
$objcommon = new common();
$fpf = $objcommon->getConfigValue('featured_project_fee');
if ($fpf == "0") {
    echo "Free";
} else {
    echo "\$" . $fpf . " Fee";
}
?>
          <br />
          <small>Your project will appear longer on the main page and you will receive lower bids. This fee must be paid at time of posting project. Click here to read more about Featured projects.<br />
          <br />
          <span class="red">Note: Your project MUST be Featured if it requires bids in the form of hourly/monthly wages, per-item pricing, commissions, trades, etc.</span></small> </td>
      </tr>
      <tr class="fir">
        <th valign="top"><input type="checkbox" name="makePrivate" id="makePrivate" onclick="enablecertified(this.id);"/>
          <label for="makePrivate"> Make Project Private</label></th>
        <td><?php 
예제 #5
0
<?php

session_start();
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/common.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/service.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/user.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/config.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/image.class.php";
require_once $_SERVER['DOCUMENT_ROOT'] . "/common/class/photo.class.php";
$objuser = new user();
$objuser->checkLoginAjax();
if (is_array($_POST)) {
    $pid = "";
    if (isset($_SESSION['photofilename'])) {
        $photo = new photo();
        $commonObj = new common();
        $size[0] = $commonObj->getConfigValue("imagesize1");
        $size[1] = $commonObj->getConfigValue("imagesize2");
        $size[2] = $commonObj->getConfigValue("imagesize3");
        $photo->createPhotos($size, $_SESSION['photofilename']);
        $pid = $photo->insertimage();
    }
    $objservice = new service();
    $objservice->update($_POST);
    if ($pid != "") {
        $objservice->addimages($_POST['serviceid'], $pid);
    }
    echo "script: messageBox('Service Updated..',function() { window.location='account.php'; }); ";
}
예제 #6
0
 function resetPassword($ar)
 {
     $sql = "select count(*) as cnt from `users` where resetpasswordlink='" . $ar['linkid'] . "'";
     $array = $this->queryrow($sql);
     if ($array['cnt'] > 0) {
         $objcommon = new common();
         $str = $objcommon->getTemplateFormat('resetpassword');
         $objconfig = new config();
         $sql = "update users set password='******'password']) . "' where resetpasswordlink='" . $ar['linkid'] . "'";
         $array = $this->query($sql);
         $to['name'] = $array['username'];
         $to['email'] = $array['email'];
         $from['name'] = $objcommon->getConfigValue('reset_password_from_name');
         $from['email'] = $objcommon->getConfigValue('reset_password_from_email');
         $subject = $objcommon->getConfigValue('reset_password_from_subject');
         $identifier['sitename'] = $objcommon->getConfigValue('sitename');
         $identifier['username'] = $array['username'];
         $identifier['password'] = $ar['password'];
         $objemail = new email();
         echo $identifier['link'];
         $objemail->sendMail($to, $from, $subject, $str, $identifier);
         $sql = "update users set resetpasswordlink='' where resetpasswordlink='" . $ar['linkid'] . "'";
         $array = $this->query($sql);
         return true;
     } else {
         $this->error = "Unable to reset your password..";
         return false;
     }
 }
예제 #7
0
 function changePassword($ar)
 {
     $sql = "select * from `users` where password='******'currentpassword']) . "' and id='" . $this->getLoggedID() . "'";
     $array = $this->mysql->queryrow($sql);
     if (is_array($array)) {
         $objcommon = new common();
         $str = $objcommon->getTemplateFormat('changepassword');
         $objconfig = new config();
         $newpass = md5($ar['newpassword']);
         $sql = "update users set password='******' where id='" . $this->getLoggedID() . "'";
         $this->mysql->query($sql);
         $to['name'] = $array['username'];
         $to['email'] = $array['email'];
         $from['name'] = $objcommon->getConfigValue('change_password_from_name');
         $from['email'] = $objcommon->getConfigValue('change_password_from_email');
         $subject = $objcommon->getConfigValue('change_password_from_subject');
         $identifier['sitename'] = $objcommon->getConfigValue('sitename');
         $identifier['username'] = $array['username'];
         $identifier['password'] = $ar['newpassword'];
         $objemail = new email();
         $objemail->sendMail($to, $from, $subject, $str, $identifier);
         return "1";
     } else {
         //	echo "else part";
         $this->error = "Invalid Current Password..";
         return "0";
     }
     disconnect_db($cn);
 }