element Posted September 25, 2007 Report Share Posted September 25, 2007 kaa nosleept lietotaaja profila bildi taa, lai vinju nevareetu atveert/redzeet citi? maybe uzgjenereejot atsevishkju rand(id)? tas pats buutu.. kaa vienam lietotaajam nosleept personiigaas bildes un savukaart ljaut redzeet citiem publiski pieejamaas? Link to comment Share on other sites More sharing options...
andrisp Posted September 25, 2007 Report Share Posted September 25, 2007 Izsakies skaidrāk. Šobrīd no tava skaidrojuma varu teikt tikai vienu: vienkārši nepublicē lietotāja bildi. :) ...vienam lietotaajam nosleept personiigaas bildes un savukaart ljaut redzeet citiem publiski pieejamaas? Pie bildes pieprasīšanas čeko, kas par jūzeri pieprasa. Ja pats, tad rāda, ja cits, tad ne. Īzī. Link to comment Share on other sites More sharing options...
Grey_Wolf Posted September 25, 2007 Report Share Posted September 25, 2007 atseviskja tabula: user_id | atljauts_userim_id un kad grib paskatiities konkretam userim (profilu tach tapat radi peec ID) tad paskaties tabulaa vai driikst raadiit vai nee..... ----------- Link to comment Share on other sites More sharing options...
element Posted September 25, 2007 Author Report Share Posted September 25, 2007 (edited) pie bildes pieprasiishanas ir skaidrs, ka buutu jaacheko kaads juuzeris vinju skataas, bet kaa to organizeet failu struktuuraa.. lietotaajam varbuut atsevishkju direktoriju, kuraa ir visas bildes ar bildes_id.jpg ? varbuut veel kaa savaadaak vinjas taa vienkaarshi nevareetu apskatiities (piem .htaccess, bet kaa?) kaa lietotaaju bilzhu galerijas vareetu organizeet? varbuut varat kaadus piemeerus, idejas mineet? Edited September 25, 2007 by element Link to comment Share on other sites More sharing options...
andrisp Posted September 25, 2007 Report Share Posted September 25, 2007 Taisi, lai bildēm piekļūst caur skriptu norādot ID (cik noprotu, tu jau tā dari). Pēc tam ir divi varianti: 1) ar .htaccess neatļaut pa tiešo pieprasīt bildi. (nepateikšu gan kā tieši) 2) bildes glabāt ārpus publiski pieejamām direktorijām. Link to comment Share on other sites More sharing options...
element Posted September 25, 2007 Author Report Share Posted September 25, 2007 (edited) interesanti kaa abus variantus vareetu uzveidot.. jo par htaccess man gan ir tumsha bilde par otro variantu, tas shkjiet jau saprotamaaks Edited September 25, 2007 by element Link to comment Share on other sites More sharing options...
Delfins Posted September 25, 2007 Report Share Posted September 25, 2007 (edited) Nu visērtākais ir PHP wraperis: 1.) check ID 2.) output image (pa taisno, nevis caur GD) <?php if ($_SESS[....]) { echo get_file_contents('img_data/'.$_SESS['user_image_id_whatever']); } else { echo get_file_contents('img/no_access.jpg'); } ?> Edited September 25, 2007 by Delfins Link to comment Share on other sites More sharing options...
Grey_Wolf Posted September 25, 2007 Report Share Posted September 25, 2007 mazinsh labojums pie Delfins nevis get_file_contents() bet gan file_get_contents() un to visu atseviskjaa failaa BEZ nekaada autputa un lai arii beidzaas ar ?> BEZ PARNESHANS jaunaa rinda.... tad to visu izsauc <img src="mans_fails.php">... tieshi taa pa taisno no HTML... ------- Link to comment Share on other sites More sharing options...
Recommended Posts