public function resize_profile_timeline($mno, $mptno) { $ri = new resizeImage(); $ri->load("{$this->ppic_orginal}/{$mno}.jpg"); #profile pic $ri->set_all_for_location("{$this->profileTimeline_original}/{$mno}.jpg", "{$this->profileTimeline_cropped}/{$mptno}.jpg", '', '', $ri); #profile thumnails $ri->set_all_for_location("{$this->profileTimeline_original}/{$mno}.jpg", "{$this->profile_timeline_thumbnail}/{$mptno}.jpg", 50, '', $ri); echo " resize {$this->ppic_profile}/{$mptno} <br> "; }
<!--print file upload for image of the brand or category --> <?php $path = '../../../fs_folders/images/uploads/brands'; for ($i = 0; $i < count($res); $i++) { $bno = $res[$i]['bno']; $bcno = $res[$i]['bcno']; $myFile = $_FILES["myFile_{$bno}"]; //get brand category // $res1 = $db->select('fs_brand_category', '*', null, 'bcno = ' . $bcno); $res1 = select_v3('fs_brand_category', '*', 'bcno = ' . $bcno); // $res1 = $db->getResult(); //print_r($res1); $type = $res1[0]['type']; $imgPath = $path . "/{$bno}" . "_{$type}.jpg"; $success = move_uploaded_file($myFile["tmp_name"], $imgPath); if (!$success) { echo "<p>Unable to save file. type {$type} </p>"; } else { echo "photo saved tyype {$type} <br>"; /** Resize image */ $ri = new resizeImage(); $ri->load($imgPath); #profile pic $ri->set_all_for_location($imgPath, $imgPath, 157, '', $ri); echo "<img src='{$imgPath}' />"; /** Update brand */ if ($db->update('fs_brands', array('visible' => 2), 'bno = ' . $bno)) { echo "updated to visible<br>"; } } }
<?php require("fs_folders/php_functions/connect.php"); require("fs_folders/php_functions/function.php"); require("fs_folders/php_functions/myclass.php"); require("fs_folders/php_functions/library.php"); require("fs_folders/php_functions/source.php"); $mc = new myclass(); $ri = new resizeImage(); $_SESSION['mno'] = $mc->get_cookie( 'mno' , 136 ); $mno = $mc->get_cookie( 'mno' , 136 ); $width = $_SESSION['width_crop_size_limit']; $type = ( !empty($_SESSION['type']) ) ? $_SESSION['type'] : null ; ; $type1 = ( !empty($_GET['type']) ) ? $_GET['type'] : null ; if ( !empty($type1) )$type = $type1; // $type = 'profile-timeline'; //$mno = 1016; //echo "mno - " . $mno; echo " <div id='fs-general-ajax-response' style='color:#fff;position:fixed;background-color:#000;z-index:200;display:none' > "; // $mc->unlink_profile_pics( $mno ); echo "Type = " . $type . '<br>'; switch ( $type ) { case 'new-member-fb-login': echo " new member fb login <br> "; $mppno = $mc ->member_profile_pic_query( array('mno'=>$mno , 'type'=>'get-latest-mppno' ) );
public function modals_look($ano, $pagenum = null, $page = null) { // echo "modals_look ( $ano , $pagenum , $page )"; $this->auto_detect_path(); $ri = new resizeImage(); $activity = $this->get_activity_posted($ano); $whoAction = $activity[0]['mno']; $plno = $activity[0]['_table_id']; $action = $activity[0]['action']; $_date = $activity[0]['_date']; $li = $this->posted_look_info($plno); $view = $li['tlview']; $redrip = 0; $favorites = 0; $plno_link = $plno; $comment = $li['pltcomment']; if ($action == 'Posted') { $ownername = ''; $br = '<br>'; $action = 'Posted a new look'; } elseif (strpos($action, 'Posted')) { $ownername = ''; $br = ''; $ownername = "his look"; } else { $ownername = ''; $br = ''; $ownername = " a look by <b> <a href='profile?id={$li['mno']}' > " . $this->get_full_name_by_id($li['mno']) . " </a> </b>"; } $more = $this->get_more_friends_doing_the_action($whoAction, $plno, $action); $image = $this->get_my_action_image_equivalent($whoAction, $plno, $action); $doingactionname = "<b>" . $this->get_full_name_by_id($whoAction) . "</b>"; $when = $this->get_time_ago($_date); $action = strtolower($action); $action = "\n\t\t <div style='border:1px solid none;line-height:16px; ' id='look-modals-action' > \n\t\t\t <a href='profile?id=" . $whoAction . "' >{$doingactionname}</a>\n\t\t\t {$br} \n\t\t\t {$more} \n\t\t\t {$action} \n\t\t\t {$ownername} \n\t\t\t {$br} \n\t\t\t {$when} \n\t\t\t {$image} \n\t\t </div>"; $rating_percent = $li['pltpercentage']; $rating_total = $li["pltvotes"]; $ri->load("../../../" . $this->look_folder_home . "/{$plno}.jpg"); # if ($ri->getHeight() < 201) { $min_look_hight = 'height:230px;'; } else { $min_look_hight = 'height:auto;'; } temporary disabled set enable to set min height of the look if ($ri->getHeight() < 201) { $min_look_hight = 'height:230px;'; } else { $min_look_hight = 'height:auto;'; } $look_modals_height = $ri->getHeight(); $auto_height = "height:{$look_modals_height}" . "px;"; $lookname = $li['lookName']; $lookOwnerMno = $li['lookOwnerMno']; $lookAbout = $li['lookAbout']; if ($look_modals_height < 250) { $look_name_limitted = $this->set_text_limit_show($lookname, 50); $look_about_limitted = $this->set_text_limit_show($lookAbout, 120); // echo " between 200 and 230 "; } else { $look_name_limitted = $this->set_text_limit_show($lookname, 300); $look_about_limitted = $this->set_text_limit_show($lookAbout, 300); // echo " exceed 200 and 230 "; } $b1 = $this->check_if_more($lookname, $look_name_limitted); $b2 = $this->check_if_more($lookAbout, $look_about_limitted); if ($page == 'home') { $share_style = "position:absolute;margin-top:-42px; margin-left:40px"; $bg_mouse_over_style = 'margin-top: 5px;'; $footer_bg_style = 'position: absolute; margin-left:-1px; display: block; margin-top: 6px; z-index: 100; background-color: #000; opacity: 0.6; width: 284px; height: 81px; border-radius: 0 0 5px 5px ;'; } else { if ($page == 'profile') { $share_style = "position:absolute;margin-top:-37px; margin-left:40px"; $bg_mouse_over_style = 'margin-top: 0px;'; $footer_bg_style = 'position: absolute; margin-left:-1px; display: block; margin-top: 6px; z-index: 100; background-color: #000; opacity: 0.6; width: 285px; height: 80px; border-radius: 0 0 5px 5px ;'; } else { } } $this->print_name_looktitle_look_desc_for_share($lookOwnerMno, $plno, $lookname, $lookAbout); // $bg_mouse_over_style = get_bg_mousver_style_by_page ( $page ); $profile_check_exist = $this->set_check_profile_exist(null, $whoAction); $plno = $ano; ?> <div id='imgs'> <modals-item > <!-- <a href="lookdetails?id=<?php echo $plno_link; ?> #a-b"> --> <?php // $end = $pagenum*10; // $start = $end-10; // echo " start = $start end $end "; ?> <div style="position:absolute;visibility:hidden;"> <class>look_t<?php echo $plno; ?> </class><class>look_t<?php echo $plno; ?> </class> </div> <div id="look_height_width" class="look_container_div" style="<?php echo $con->look_height_width; ?> ; " > <table id='look_t' class="look_t<?php echo $plno; ?> " border="0" cellpadding="0" cellspacing="0" onmouseout="img_mouseout('.look_mouserOver_bg<?php echo $plno; ?> , .look_mouserOver_c<?php echo $plno; ?> ' , '.rate<?php echo $plno; ?> , .body_auto_background<?php echo $plno; ?> , .look_footer_bg_c<?php echo $plno; ?> ')" > <tr> <td> <ul style="padding:0px; margin:0px; " > <li style="border:1px solid none;" > <a href="profile?id=<?php echo $whoAction; ?> " > <?php $this->member_thumbnail_display($this->ppic_thumbnail, $whoAction, "../../../{$this->ppic_thumbnail}"); ?> </a> </li> <li style="border:1px solid none; padding-left:10px; font-family:arial; font-size:12px; width:200px; word-wrap: break-word; text-decoration:none; list-style:none; color:#284372 " > <?php echo $action; ?> </li> </ul> </td> <tr> <td style="height:10px;" > </td> <tr> <td> <table border="0" id='rate' class='rate<?php echo $plno; ?> ' onmouseover="img_mouseover('look','.rate<?php echo $plno; ?> , .body_auto_background<?php echo $plno; ?> , .look_footer_bg_c<?php echo $plno; ?> ','.look_mouserOver_bg<?php echo $plno; ?> , .look_mouserOver_c<?php echo $plno; ?> ')" > <tr> <!-- <td> <img src="fs_folders/images/body/Look/<?php echo $con->stars; ?> stars.png" > </td> --> </table> <div id='look_mouserOver_c' class='look_mouserOver_c<?php echo $plno; ?> ' style="display:none" > <table id='look_f_1row' border="0" onmouseover="img_mouseover('look','.rate<?php echo $plno; ?> , .body_auto_background<?php echo $plno; ?> , .look_footer_bg_c<?php echo $plno; ?> ','.look_mouserOver_bg<?php echo $plno; ?> , .look_mouserOver_c<?php echo $plno; ?> ')" > <tr> <td> <img id = "percentage_img" <img src="fs_folders/images/body/Look/look icon.png" > </td> <td> <span id='percentage_text' > <?php echo $rating_percent; ?> </span><span style='font-size:15px;' > %</span></td> <td> <span id='mesage_text' > RATE ( <?php echo $rating_total; ?> ) </span> <img id = "mesage_img" src="fs_folders/images/body/Look/transparent bubble.png"> </td> </table> <table id='title_desc_t' border="0" onmouseover="img_mouseover('look','.rate<?php echo $plno; ?> , .body_auto_background<?php echo $plno; ?> , .look_footer_bg_c<?php echo $plno; ?> ','.look_mouserOver_bg<?php echo $plno; ?> , .look_mouserOver_c<?php echo $plno; ?> ')" > <tr> <td> <div id='tdpadding' > paddding </div> </td> <tr> <td id='title_desc_container' onmouseover="img_mouseover('look','.rate<?php echo $plno; ?> , .body_auto_background<?php echo $plno; ?> , .look_footer_bg_c<?php echo $plno; ?> ','.look_mouserOver_bg<?php echo $plno; ?> , .look_mouserOver_c<?php echo $plno; ?> ')" > <div id='look_title' style='font-size:20px;' > <a href="lookdetails?id=<?php echo $plno_link; ?> #a-b"> <?php echo " <span style='color:#fff' >{$look_name_limitted}</span> "; ?> </a> </div> </td> <tr> <td id='title_desc_container' onmouseover="img_mouseover('look','.rate<?php echo $plno; ?> , .body_auto_background<?php echo $plno; ?> , .look_footer_bg_c<?php echo $plno; ?> ','.look_mouserOver_bg<?php echo $plno; ?> , .look_mouserOver_c<?php echo $plno; ?> ')" > <div id='look_desc' style='font-size:12px;' > <!-- look desc --> <a href="lookdetails?id=<?php echo $plno_link; ?> #a-b"> <?php echo " <span style='color:#fff' >{$look_about_limitted}</span> "; ?> </a> </div> </td> </table> <table id='look_f_2row1' border="0" onmouseover="img_mouseover('look','.rate<?php echo $plno; ?> , .body_auto_background<?php echo $plno; ?> , .look_footer_bg_c<?php echo $plno; ?> ','.look_mouserOver_bg<?php echo $plno; ?> , .look_mouserOver_c<?php echo $plno; ?> ')" > <tr> <td> <img id='tmsg' src="fs_folders/images/body/Look/comment icon.png" title="comments (<?php echo $con->comment; ?> )" > </td> <td> <span> <?php echo $comment; ?> </span> </td> <td> <img id='teye' src="fs_folders/images/body/Look/views icon.png" title="views (<?php echo $view; ?> )" > </td> <td> <span> <?php echo $view; ?> </span> </td> <td> <img id='tarrw' src="fs_folders/images/body/Look/redrip.png" title="drips (<?php echo $redrip; ?> )" > </td> <td> <span> <?php echo $redrip; ?> </span> </td> <td> <img id='thrt' src="fs_folders/images/body/Look/favorites icon.png" title="favorites (<?php echo $favorites; ?> )" > </td> <td> <span> <?php echo $favorites; ?> </span> </td> </table> </div> <a href="lookdetails?id=<?php echo $plno_link; ?> #look_view_header"> <div id='look_mouserOver_bg' class='look_mouserOver_bg<?php echo $plno; ?> ' style="<?php echo $bg_mouse_over_style; ?> " onmouseover="img_mouseover('look','.rate<?php echo $plno; ?> , .body_auto_background<?php echo $plno; ?> , .body_auto_background<?php echo $plno; ?> , .look_footer_bg_c<?php echo $plno; ?> ','.look_mouserOver_bg<?php echo $plno; ?> , .look_mouserOver_c<?php echo $plno; ?> ')" > </div> </a> <!-- <img id='look_img' src="fs_folders/images/posted look/<?php echo $look_id; ?> .jpg" onmouseover="img_mouseover('look','.rate<?php echo $plno; ?> , .look_footer_bg_c<?php echo $plno; ?> ','.look_mouserOver_bg<?php echo $plno; ?> , .look_mouserOver_c<?php echo $plno; ?> ')" > --> <!-- <div id='body_auto_background' class='body_auto_background<?php echo $plno; ?> ' onmouseover="img_mouseover('look','.rate<?php echo $plno; ?> , .body_auto_background<?php echo $plno; ?> , .body_auto_background<?php echo $plno; ?> , .look_footer_bg_c<?php echo $plno; ?> ','.look_mouserOver_bg<?php echo $plno; ?> , .look_mouserOver_c<?php echo $plno; ?> ')" > </div> --> <table border="0" cellpadding="0" cellspacing="0" style="<?php echo $auto_height; ?> " > <tr> <td id="img_container_td" class="img_container_td<?php echo $plno; ?> " > <img id='look_img' class="look_t<?php echo $plno; ?> _img" style="<?php echo $min_look_hight; ?> " src="<?php echo "fs_folders/images/uploads/posted looks/lookdetails/{$plno_link}.jpg"; ?> " onmouseover="img_mouseover('look','.rate<?php echo $plno; ?> , .body_auto_background<?php echo $plno; ?> , .look_footer_bg_c<?php echo $plno; ?> ','.look_mouserOver_bg<?php echo $plno; ?> , .look_mouserOver_c<?php echo $plno; ?> ','.img_container_td<?php echo $plno; ?> ' , '.look_mouserOver_bg<?php echo $plno; ?> ')" > <!-- <img id='look_img' class="look_t<?php echo $plno; ?> _img" style="<?php echo $min_look_hight; ?> " src="<?php echo "fs_folders/images/uploads/posted looks/lookdetails/{$plno}.jpg"; ?> " onmouseover="img_mouseover('look','.rate<?php echo $plno; ?> , .body_auto_background<?php echo $plno; ?> , .look_footer_bg_c<?php echo $plno; ?> ','.look_mouserOver_bg<?php echo $plno; ?> , .look_mouserOver_c<?php echo $plno; ?> ','.img_container_td<?php echo $plno; ?> ' , '.look_mouserOver_bg<?php echo $plno; ?> ')" > --> </td> <tr> <td> <div id='look_footer_bg_c' style="margin-top:-87px;" class='look_footer_bg_c<?php echo $plno; ?> ' > <table id='look_f_1row' border="0" onmouseover="img_mouseover('look','.rate<?php echo $plno; ?> , .body_auto_background<?php echo $plno; ?> , .look_footer_bg_c<?php echo $plno; ?> ','.look_mouserOver_bg<?php echo $plno; ?> , .look_mouserOver_c<?php echo $plno; ?> ')" > <tr> <td> <img id = "percentage_img" <img src="fs_folders/images/body/Look/look icon.png" > </td> <td> <span id='percentage_text' > <?php echo $rating_percent; ?> </span><span style='font-size:15px;' > %</span></td> <td> <span id='mesage_text' > RATE ( <?php echo $rating_total; ?> ) </span> <img id = "mesage_img" src="fs_folders/images/body/Look/transparent bubble.png" > </td> </table> <a href="lookdetails?id=<?php echo $plno_link; ?> #a-b"> <div id='footer_bg' style="margin-top: 7px; " > </div> </a> </div> <table id='look_f_2row' border="0" onmouseover="img_mouseover('look','.rate<?php echo $plno; ?> , .body_auto_background<?php echo $plno; ?> , .look_footer_bg_c<?php echo $plno; ?> ','.look_mouserOver_bg<?php echo $plno; ?> , .look_mouserOver_c<?php echo $plno; ?> ')" > <tr> <td> <img id='tmsg' style="cursor:pointer" src="fs_folders/images/body/Look/comment icon.png" title="comments" > </td> <td style="width:25px;" > <span> <?php echo $comment; ?> </span> </td> <td> <img id='teye' style="cursor:pointer" src="fs_folders/images/body/Look/views icon.png" title="views" > </td> <td style="width:25px;" > <span> <?php echo $view; ?> </span> </td> <td> <img id='tarrw' style="cursor:pointer" src="fs_folders/images/body/Look/redrip.png" title="drips" > </td> <td style="width:25px;" > <span> <?php echo $redrip; ?> </span> </td> <td > <img id='thrt' style="cursor:pointer" src="fs_folders/images/body/Look/favorites icon.png" title="favorites"> </td> <td style="display:none" > <span> <?php echo $favorites; ?> </span> </td> <td style="width:35px;" > <img style="cursor:pointer" src="fs_folders/images/body/Look/share-icon1.png" id='share_look_modals<?php echo $plno; ?> ' onmouseover="share_mouser_over('<?php echo $plno; ?> ')" onmouseout="share_mouser_out('<?php echo $plno; ?> ')" > </td> </table> </td> <tr> <td> <div style="position:absolute;border:1px solid none; background-color: none; margin-top:-25px; z-index:120; display: none; padding-top:12px; " id="dropdown_share<?php echo $plno; ?> " onmouseover="share_mouser_over('<?php echo $plno; ?> ')" onmouseout="share_mouser_out('<?php echo $plno; ?> ')" > <img src="fs_folders/images/body/Look/look-module-share-bar-container.png" itle="share" id='share_look_modals<?php echo $plno; ?> ' style='width:286px; height:55px; ' /> <table border="0" cellpadding="0" cellspacing="0" style="<?php echo $share_style; ?> " onclick="return false" > <tr> <td style="padding-left:0px;cursor:pointer" ><img style="width:20px" src="fs_folders/images/attr/ld_white_fb.png" title = "facebook" onclick="fbshare('<?php echo $plno; ?> ','home');" ></td> <td style="padding-left:7px;cursor:pointer" ><img style="width:20px" src="fs_folders/images/attr/ld_white_tw.png" title = "twitter" onclick="twitter_look('<?php echo $plno; ?> ' , '<?php echo $lookname; ?> ' ) " ></td> <td style="padding-left:7px;cursor:pointer" ><img style="width:20px" src="fs_folders/images/attr/ld_white_t.png" title = "tumblr" onclick="share_tumblr_looks('<?php echo $plno; ?> ')" > </td> <td style="padding-left:7px;cursor:pointer" ><img style="width:20px" src="fs_folders/images/attr/ld_white_q.png" title = "pinterest" onclick="share_pinterest( '<?php echo $plno; ?> ' )" ></td> <td style="padding-left:7px;cursor:pointer" > <a href="https://plus.google.com/share?url={http://fashionsponge.com/lookdetails?id=<?php echo $plno; ?> }" onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"> <img style="width:20px" src="fs_folders/images/attr/ld_white_g+.png" title = "google+" > </a> </td> <td style="padding-left:7px;cursor:pointer" ><img style="width:20px" src="fs_folders/images/attr/ld_white_line.png" title = "stumbleupon" onclick="PopupCenter('http://www.stumbleupon.com/submit?url=http://fashionsponge.com/fs/lookdetails.php?id=<?php echo $plno; ?> &src=badge','Share to StumbleUpon +',800,540)" ></td> <td style="padding-left:7px;cursor:pointer" ><img style="width:20px" src="fs_folders/images/attr/ld_white_mail.png" title = "email" onclick="share_gmail_looks( '<?php echo $plno; ?> ' )" ></td> </table> </div> </td> </table> <div id='padding'> </div> </div> <!-- </a> --> </div> <?php }
<?php require "fs_folders/php_functions/connect.php"; require "fs_folders/php_functions/function.php"; require "fs_folders/php_functions/myclass.php"; require "fs_folders/php_functions/library.php"; require "fs_folders/php_functions/source.php"; $ri = new resizeImage(); $mc = new myclass(); $mc->auto_detect_path(); $_SESSION['mno'] = $mc->get_cookie('mno', 136); $mno = $mc->get_cookie('mno', 136); if (!empty($_SESSION['adm_no'])) { #can edit } else { if (empty($_SESSION['mno'])) { $mc->go('home'); } } $_SESSION['post_a_look_is_look_upload_once_in_db'] = false; // echo " this is is to be edited look = ".tobe_edite_look_id().'<br>'; if (is_edit_look(tobe_edite_look_id())) { // echo "edite look"; $plno = tobe_edite_look_id(); $pl_info = $mc->posted_look_info($plno); // print_r($pl_info); // echo 'lnmae '.$pl_info['lookName'].' ldesc'.$pl_info['lookAbout']; // echo " total tags = ".count($pl_info['pltags']); // for ($i=0; $i < count($pl_info['pltags']) ; $i++) { // $pl_info[$i][] // echo " pltags = ";
<?php require("fs_folders/php_functions/connect.php"); require("fs_folders/php_functions/function.php"); require("fs_folders/php_functions/myclass.php"); require("fs_folders/php_functions/library.php"); require("fs_folders/php_functions/source.php"); $mc = new myclass(); $ri = new resizeImage(); $_SESSION['mno'] = $mc->get_cookie( 'mno' , 136 ); $mno = $mc->get_cookie( 'mno' , 136 ); $type = 'profile-timeline'; echo " <div id='fs-general-ajax-response' style='color:#fff;position:fixed;background-color:#000;z-index:200;display:block' > "; echo " </div> "; echo " mno = $mno "; $plno = $mc->postedlook_query( array('mno' =>$mno , 'type'=>'get-latest-plno' ) ); // $plno = 222278; // $img_width = 300; // $img_height = 450;