Thread: [Phplib-users] Classes, MySQL, Images & phplib
Brought to you by:
nhruby,
richardarcher
From: Mike G. <mi...@op...> - 2001-12-31 15:14:59
|
Hello, I'm having a bit of trouble convincing a phplib class to produce an image from a MySQL database.. So far I've got the following: require("config.php3"); class Image { var $db; function Image() { global $ID; $img->db = new Image; $sql="SELECT photo FROM WLPphoto WHERE profileID='$ID'"; $img->db->query($sql); while($img->db->next_record()) { Header("Content-type: image/jpeg"); echo $this->db->Record[photo]; } } } config.php3 has the database variables defined (much as they are set in phpSlash).. It's been a couple months since I've played with classes, so perhaps it's just that I'm just a bit rusty.. I'd like to generate a script to pull an image out of a database based on a $ID number. This all works fine outside of the phplib environment, but I can't figure out how to get this class to display any results.. Any suggestions? Mike -- Mike Gifford, OpenConcept Consulting, http://www.openconcept.ca Supporting progressive organizations in online campaigns and tools. Feature: Women's Learning Partnership http://learningpartnership.org Truth is that which confirms what we already believe. Northrop Frye |
From: nathan r. h. <na...@ds...> - 2001-12-31 16:35:28
|
On Mon, 31 Dec 2001, Mike Gifford wrote: > Hello, > > I'm having a bit of trouble convincing a phplib class to produce an > image from a MySQL database.. > > So far I've got the following: > > require("config.php3"); > class Image { > var $db; > function Image() { > global $ID; > $img->db = new Image; > $sql="SELECT photo FROM WLPphoto WHERE profileID='$ID'"; > $img->db->query($sql); > while($img->db->next_record()) { > Header("Content-type: image/jpeg"); > echo $this->db->Record[photo]; > } > } > } > require('config.php'); class Image { var $db; // Suck in the ID from the GLOBALS array, handy becasue you can chnage // the ID at runtime if'n ya want. function Image($id = $GLOBALS[ID]) { // Above you instance the wrong class (the one you're running, // suprising this should have caused an infinate loop) // The reason this wasn't working is beacus you never instanced the // phplib class $this->db = new nameOfdbClass; $sql = "blah blah blah" $this->db->query($sql); while ($this->db->next_record()) { header("here's an image"); print $this->db->Record['photo']; } } } Note that you can ahould be able to run run imageSize() on the sql refernce adn double check it's image type before sending the header. Here's chuck of code I have for one project, you'll need to modify it for your own purposes, but it's an ok example of imagesize() function getType() { if ($debug) { echo "Getting Type"; echo "image::getType() - type is $this->currImg['imagesize'][2]<br>\n"; } switch ($this->currImg['imageSize'][2]) { case 1: return("gif"); break; case 2: return("jpeg"); break; case 3: return("png"); break; case 4: return("swf"); break; default: return("unknown"); break; } } -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- nathan hruby / digital statement na...@ds... http://www.dstatement.com/ Public GPG key can be found at: http://www.dstatement.com/nathan-gpg-key.txt ED54 9A5E 132D BD01 9103 EEF3 E1B9 4738 EC90 801B -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- |
From: Mike G. <mi...@op...> - 2001-12-31 17:34:46
|
Hi Nathan, 1st - Damn your a good resource.. nathan r. hruby wrote: > require('config.php'); > class Image { > var $db; > // Suck in the ID from the GLOBALS array, handy becasue you can chnage > // the ID at runtime if'n ya want. > function Image($id = $GLOBALS[ID]) { > // Above you instance the wrong class (the one you're running, > // suprising this should have caused an infinate loop) > // The reason this wasn't working is beacus you never instanced the > // phplib class > $this->db = new nameOfdbClass; > $sql = "blah blah blah" > $this->db->query($sql); > while ($this->db->next_record()) { > header("here's an image"); > print $this->db->Record['photo']; > } > } > } OK.. My present code looks like this: require('config.php3'); class Image { var $db; function Image($ID='$GLOBALS[ID]') { $this->db = new DB_Sql; $sql="SELECT photo FROM WLPphoto WHERE profileID='$ID'"; $this->db->query($sql); while ($this->db->next_record()) { Header("Content-type: image/jpeg"); print $this->db->Record['photo']; } } } and produces only this: <html><body></body></html> I just want to clarify though.. in the example you gave ($this->db = new nameOfdbClass;), if I was trying to add this to phpSlash 6.2 nameOfdbClass; would be DB_Sql (or would it be slashDB? Both seem to produce the same result for me.. I even tried commenting out the header line (Header("Content-type: image/jpeg");) to see if that would just echo the raw jpg data.. It didn't.. So something's goofing up... > Note that you can ahould be able to run run imageSize() on the sql > refernce adn double check it's image type before sending the header. > Here's chuck of code I have for one project, you'll need to modify it for > your own purposes, but it's an ok example of imagesize() > function getType() { > if ($debug) { > echo "Getting Type"; > echo "image::getType() - type is $this->currImg['imagesize'][2]<br>\n"; > } > switch ($this->currImg['imageSize'][2]) { > case 1: > return("gif"); > break; > case 2: > return("jpeg"); > break; > case 3: > return("png"); > break; > case 4: > return("swf"); > break; > default: > return("unknown"); > break; > } > } This is useful code.. Likely better than the current upload script offers.. However, it is already using imagesize once to insert the data (not that you would know that), so there's no need to do it again afterwards.. Mike -- Mike Gifford, OpenConcept Consulting, http://www.openconcept.ca Supporting progressive organizations in online campaigns and tools. Feature: Women's Learning Partnership http://learningpartnership.org Truth is that which confirms what we already believe. Northrop Frye |
From: nathan r. h. <na...@ds...> - 2001-12-31 18:22:32
|
On Mon, 31 Dec 2001, Mike Gifford wrote: > Hi Nathan, > > 1st - Damn your a good resource.. > Thanks :) > OK.. My present code looks like this: > > require('config.php3'); > class Image { > var $db; > function Image($ID='$GLOBALS[ID]') { No quotes in the above, it's not working cause $ID is being set to the string "$GLOBALS[ID]" and not the actual value of the global $ID (as a side note, this happen becasue you're using single quotes which casue literal strings, double quotes would have meant that the string would have been scanned for variable substituion and it would have been ok, but you would have paid a small performance penalty for that substitution. This is where knowing everything about your varibles comes in handy.) > $this->db = new DB_Sql; > $sql="SELECT photo FROM WLPphoto WHERE profileID='$ID'"; > $this->db->query($sql); > while ($this->db->next_record()) { > Header("Content-type: image/jpeg"); > print $this->db->Record['photo']; > } > } > } > > and produces only this: > <html><body></body></html> > > I just want to clarify though.. in the example you gave ($this->db = > new nameOfdbClass;), if I was trying to add this to phpSlash 6.2 > nameOfdbClass; would be DB_Sql (or would it be slashDB? > if all youre tables are in the same databse as the phpslash stuff, then slashDB, else you'll need to make a new subclass of DB_Sql. > Both seem to produce the same result for me.. I even tried commenting > out the header line (Header("Content-type: image/jpeg");) to see if that > would just echo the raw jpg data.. It didn't.. So something's goofing > up... > Make sure you're not outputing anything before that header() call. I bet there's an error creeping in (probably from using the wrong db class) that's casuing it. For something liek what you're doing I like to add a construct like this to the top of my code: if ($debug && $HTTP_GET_VARS[breakme]) { echo "I'm outputing something to break the headers.<br>\n"; echo "This will allow me to see what exactly I'm sending.<br>\n"; echo "Including errors :)<br>\n"; } Also, check to make sure (for debug pruposes) error_reporting is set to E_ALL. And FWIW, I'd do a $this->db->nf() and make sure the returned valus is 1 and if it isn't sending a "not availible" jpeg to the browser before entering the while() loop. This ensures that if the script freaks out and can't find a image in the databse, something is returned to the user indicating so :) -n -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- nathan hruby / digital statement na...@ds... http://www.dstatement.com/ Public GPG key can be found at: http://www.dstatement.com/nathan-gpg-key.txt ED54 9A5E 132D BD01 9103 EEF3 E1B9 4738 EC90 801B -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- |
From: Mike G. <mi...@op...> - 2001-12-31 20:47:27
|
Hey Nathan, nathan r. hruby wrote: >>OK.. My present code looks like this: >>require('config.php3'); >>class Image { >> var $db; >> function Image($ID='$GLOBALS[ID]') { > No quotes in the above, it's not working cause $ID is being set to the > string "$GLOBALS[ID]" and not the actual value of the global $ID (as a > side note, this happen becasue you're using single quotes which casue > literal strings, double quotes would have meant that the string would have > been scanned for variable substituion and it would have been ok, but you > would have paid a small performance penalty for that substitution. This > is where knowing everything about your varibles comes in handy.) I tried a stack of different options on this, but these gave me parse errors: $ID=$GLOBALS[ID] $ID="$GLOBALS[ID]" and these didn't (they gave me identical - but bad results): $ID='$GLOBALS[ID]' $ID=48 As did this actually: require('config.php3'); class Image { var $db; function Image() { $ID=$GLOBALS[ID]; echo "ID $ID"; $this->db = new proDB; $sql="SELECT photo FROM WLPphoto WHERE profileID='$ID'"; $this->db->query($sql); while ($this->db->next_record()) { Header("Content-type: image/jpeg"); print $this->db->Record['photo']; } } } Although this displays properly outside of the class... $ID=$GLOBALS[ID]; echo "ID $ID"; result is: ID 48 >>I just want to clarify though.. in the example you gave ($this->db = >>new nameOfdbClass;), if I was trying to add this to phpSlash 6.2 >>nameOfdbClass; would be DB_Sql (or would it be slashDB? > if all youre tables are in the same databse as the phpslash stuff, then > slashDB, else you'll need to make a new subclass of DB_Sql. Hmm.. That is essentially what I'm doing... Some folks on this list may remember me asking about/talking up a online bibliography 6 months or so ago.. It's mostly working now and sitting here (still in draft mode): http://www.openconcept.ca/WLP/biblio/categories.php3 I'm presently working up the portfolio side (harder to explain), but this is what I need the images for... In anycase, it's all based on the 6.2 code of phpSlash.. >>Both seem to produce the same result for me.. I even tried commenting >>out the header line (Header("Content-type: image/jpeg");) to see if that >>would just echo the raw jpg data.. It didn't.. So something's goofing >>up... > Make sure you're not outputing anything before that header() call. I bet > there's an error creeping in (probably from using the wrong db class) > that's casuing it. For something liek what you're doing I like to add a > construct like this to the top of my code: > if ($debug && $HTTP_GET_VARS[breakme]) { > echo "I'm outputing something to break the headers.<br>\n"; > echo "This will allow me to see what exactly I'm sending.<br>\n"; > echo "Including errors :)<br>\n"; > } This is usefull.. That way it is easy to make/break code.. http://localhost/WLP/profiles/image.php3?ID=48&breakme=yes However, I can't seem to get any output from within the class.. Putting this in the function and commenting out the header doesn't output anything.. echo "this isn't working"; The URL above does, but.. that isn't managing stuff within the code.. > Also, check to make sure (for debug pruposes) error_reporting is set to > E_ALL. And FWIW, I'd do a $this->db->nf() and make sure the returned > valus is 1 and if it isn't sending a "not availible" jpeg to the > browser before entering the while() loop. This ensures that if the script > freaks out and can't find a image in the databse, something is returned to > the user indicating so :) I've got a couple references of phpSlash 6.2 ending Variable.class with: }; /* end of Variable.class */ and not the ?> which would be standard.. I've never seen a php file ended like that before... In anycase, the whole file now looks like this: <?php error_reporting(E_ALL); require('config.php3'); if ($debug && $HTTP_GET_VARS[breakme]) { echo "I'm outputing something to break the headers.<br>\n"; echo "This will allow me to see what exactly I'm sending.<br>\n"; echo "Including errors :)<br>\n"; } class Image { var $db; function Image() { $ID=$GLOBALS[ID]; $this->db = new proDB; echo "this isn't working"; $sql="SELECT photo FROM WLPphoto WHERE profileID='$ID'"; echo $this->db->nf(); $this->db->query($sql); while ($this->db->next_record()) { // Header("Content-type: image/jpeg"); print $this->db->Record['photo']; } } } ?> And results in the following: Warning: Undefined variable: sitename in /usr/local/web/WLP/profiles/config.php3 on line 191 Warning: Use of undefined constant rootdir - assumed 'rootdir' in /usr/local/web/WLP/profiles/Variable.class on line 23 Warning: Use of undefined constant basedir - assumed 'basedir' in /usr/local/web/WLP/profiles/Variable.class on line 24 Warning: Use of undefined constant listvariable - assumed 'listvariable' in /usr/local/web/WLP/profiles/Variable.class on line 33 Warning: Use of undefined constant newvariable - assumed 'newvariable' in /usr/local/web/WLP/profiles/Variable.class on line 34 Warning: Use of undefined constant value - assumed 'value' in /usr/local/web/WLP/profiles/Variable.class on line 55 Warning: Undefined variable: siteowner in /usr/local/web/WLP/profiles/config.php3 on line 192 Warning: Use of undefined constant value - assumed 'value' in /usr/local/web/WLP/profiles/Variable.class on line 55 Warning: Undefined variable: xsitename in /usr/local/web/WLP/profiles/config.php3 on line 193 Warning: Use of undefined constant value - assumed 'value' in /usr/local/web/WLP/profiles/Variable.class on line 55 Warning: Use of undefined constant breakme - assumed 'breakme' in /usr/local/web/WLP/profiles/image.php3 on line 5 Warning: Undefined index: breakme in /usr/local/web/WLP/profiles/image.php3 on line 5 Which shouldn't be affecting things when the errors are turned off.. Those should be pretty innocent.. Mike -- Mike Gifford, OpenConcept Consulting, http://www.openconcept.ca Supporting progressive organizations in online campaigns and tools. Feature: Women's Learning Partnership http://learningpartnership.org Truth is that which confirms what we already believe. Northrop Frye |
From: Frank B. <fb...@sy...> - 2001-12-31 20:52:46
|
Try: function Image() { global $GLOBALS; $ID=$GLOBALS[ID]; At 03:51 PM 12/31/01 -0500, Mike Gifford wrote: >Hey Nathan, > >nathan r. hruby wrote: > >>>OK.. My present code looks like this: >>>require('config.php3'); >>>class Image { >>> var $db; >>> function Image($ID='$GLOBALS[ID]') { >> No quotes in the above, it's not working cause $ID is being set to the >> string "$GLOBALS[ID]" and not the actual value of the global $ID (as a >> side note, this happen becasue you're using single quotes which casue >> literal strings, double quotes would have meant that the string would have >> been scanned for variable substituion and it would have been ok, but you >> would have paid a small performance penalty for that substitution. This >> is where knowing everything about your varibles comes in handy.) > > >I tried a stack of different options on this, but these gave me parse >errors: > $ID=$GLOBALS[ID] > $ID="$GLOBALS[ID]" > >and these didn't (they gave me identical - but bad results): > $ID='$GLOBALS[ID]' > $ID=48 > >As did this actually: > >require('config.php3'); >class Image { > var $db; > function Image() { > $ID=$GLOBALS[ID]; > echo "ID $ID"; > $this->db = new proDB; > $sql="SELECT photo FROM WLPphoto WHERE profileID='$ID'"; > $this->db->query($sql); > while ($this->db->next_record()) { > Header("Content-type: image/jpeg"); > print $this->db->Record['photo']; > } > } >} > >Although this displays properly outside of the class... > $ID=$GLOBALS[ID]; > echo "ID $ID"; > >result is: > ID 48 > > >>>I just want to clarify though.. in the example you gave ($this->db = >>>new nameOfdbClass;), if I was trying to add this to phpSlash 6.2 >>>nameOfdbClass; would be DB_Sql (or would it be slashDB? >> if all youre tables are in the same databse as the phpslash stuff, then >> slashDB, else you'll need to make a new subclass of DB_Sql. > > >Hmm.. That is essentially what I'm doing... > >Some folks on this list may remember me asking about/talking up a online >bibliography 6 months or so ago.. It's mostly working now and sitting >here (still in draft mode): > http://www.openconcept.ca/WLP/biblio/categories.php3 > >I'm presently working up the portfolio side (harder to explain), but >this is what I need the images for... In anycase, it's all based on the >6.2 code of phpSlash.. > > >>>Both seem to produce the same result for me.. I even tried commenting >>>out the header line (Header("Content-type: image/jpeg");) to see if that >>>would just echo the raw jpg data.. It didn't.. So something's goofing >>>up... >> Make sure you're not outputing anything before that header() call. I bet >> there's an error creeping in (probably from using the wrong db class) >> that's casuing it. For something liek what you're doing I like to add a >> construct like this to the top of my code: > >> if ($debug && $HTTP_GET_VARS[breakme]) { >> echo "I'm outputing something to break the headers.<br>\n"; >> echo "This will allow me to see what exactly I'm sending.<br>\n"; >> echo "Including errors :)<br>\n"; >> } > > >This is usefull.. That way it is easy to make/break code.. >http://localhost/WLP/profiles/image.php3?ID=48&breakme=yes > > > >However, I can't seem to get any output from within the class.. > >Putting this in the function and commenting out the header doesn't >output anything.. > echo "this isn't working"; > >The URL above does, but.. that isn't managing stuff within the code.. > > >> Also, check to make sure (for debug pruposes) error_reporting is set to >> E_ALL. And FWIW, I'd do a $this->db->nf() and make sure the returned >> valus is 1 and if it isn't sending a "not availible" jpeg to the >> browser before entering the while() loop. This ensures that if the script >> freaks out and can't find a image in the databse, something is returned to >> the user indicating so :) > > >I've got a couple references of phpSlash 6.2 ending Variable.class with: >}; /* end of Variable.class */ > > >and not the ?> which would be standard.. I've never seen a php file >ended like that before... > >In anycase, the whole file now looks like this: > ><?php >error_reporting(E_ALL); >require('config.php3'); > >if ($debug && $HTTP_GET_VARS[breakme]) { > echo "I'm outputing something to break the headers.<br>\n"; > echo "This will allow me to see what exactly I'm sending.<br>\n"; > echo "Including errors :)<br>\n"; >} > >class Image { > var $db; > function Image() { > $ID=$GLOBALS[ID]; > $this->db = new proDB; > echo "this isn't working"; > $sql="SELECT photo FROM WLPphoto WHERE profileID='$ID'"; > echo $this->db->nf(); > $this->db->query($sql); > while ($this->db->next_record()) { > // Header("Content-type: image/jpeg"); > print $this->db->Record['photo']; > } > } >} >?> > >And results in the following: > >Warning: Undefined variable: sitename in >/usr/local/web/WLP/profiles/config.php3 on line 191 > >Warning: Use of undefined constant rootdir - assumed 'rootdir' in >/usr/local/web/WLP/profiles/Variable.class on line 23 > >Warning: Use of undefined constant basedir - assumed 'basedir' in >/usr/local/web/WLP/profiles/Variable.class on line 24 > >Warning: Use of undefined constant listvariable - assumed 'listvariable' >in /usr/local/web/WLP/profiles/Variable.class on line 33 > >Warning: Use of undefined constant newvariable - assumed 'newvariable' >in /usr/local/web/WLP/profiles/Variable.class on line 34 > >Warning: Use of undefined constant value - assumed 'value' in >/usr/local/web/WLP/profiles/Variable.class on line 55 > >Warning: Undefined variable: siteowner in >/usr/local/web/WLP/profiles/config.php3 on line 192 > >Warning: Use of undefined constant value - assumed 'value' in >/usr/local/web/WLP/profiles/Variable.class on line 55 > >Warning: Undefined variable: xsitename in >/usr/local/web/WLP/profiles/config.php3 on line 193 > >Warning: Use of undefined constant value - assumed 'value' in >/usr/local/web/WLP/profiles/Variable.class on line 55 > >Warning: Use of undefined constant breakme - assumed 'breakme' in >/usr/local/web/WLP/profiles/image.php3 on line 5 > >Warning: Undefined index: breakme in >/usr/local/web/WLP/profiles/image.php3 on line 5 > >Which shouldn't be affecting things when the errors are turned off.. >Those should be pretty innocent.. > >Mike >-- >Mike Gifford, OpenConcept Consulting, http://www.openconcept.ca >Supporting progressive organizations in online campaigns and tools. >Feature: Women's Learning Partnership http://learningpartnership.org >Truth is that which confirms what we already believe. Northrop Frye > > >_______________________________________________ >Phplib-users mailing list >Php...@li... >https://lists.sourceforge.net/lists/listinfo/phplib-users > |
From: Mike G. <mi...@op...> - 2001-12-31 21:08:25
|
Hi Frank, Frank Bax wrote: > Try: > function Image() { > global $GLOBALS; > $ID=$GLOBALS[ID]; Nope this didn't work either.. I can't get this class to output anything.. I must be completely missing something pretty big... I've now got these two lines in the class (which should be putting out something), which don't give me an error and aren't providing me with a value: echo "this isn't working $ID"; echo $this->db->nf(); Mike ps.. Maybe I just need to put this project off till the new year - ha! btw. Happy New Year Everyone! -- Mike Gifford, OpenConcept Consulting, http://www.openconcept.ca Supporting progressive organizations in online campaigns and tools. Feature: Women's Learning Partnership http://learningpartnership.org Truth is that which confirms what we already believe. Northrop Frye |
From: nathan r. h. <na...@ds...> - 2001-12-31 21:38:33
|
On Mon, 31 Dec 2001, Frank Bax wrote: > Try: > function Image() { > global $GLOBALS; > $ID=$GLOBALS[ID]; > > Umm.. $GLOBALS[] is availible everywhere, isn't it? It's an alternative to the 'global' keyword? I just asked in openprojects:#php and someone remined me that paramters need to be static (eg: function foo($bar='something')) so Umm I did steer you wrong at first. Sorry. The class looks like it should work as you have it though.. er.. what's the calling script look like? I assume you're doing something like: include('/path/to/image.class'); $img = new Image; ? Right ;-) (Hey, it take me 10 minutes to figure out someone unpluged my computer :) So a few questions: - What php version are you using? - Where exactly does $ID come from? -n.. the nice thing about New Years Eve is that I can start drinking at 4 in the afternoon and not feel guility. Wheeeeeee! ps.. I'm going to make a side trip into proper coding styles becasue I see a lot of this (Ajay is guilty of this too, hence the parser warnings): PHP Interperts the following three statements differently: $array[foo] // foo is assumed to be a constant $array["foo"] // "foo" is scanned for variables to substitute before // executing the statsment $array['foo'] // foo is taken as a literal text string mixing and matching these just don't work, you need to be aware of what you're using. In your script you use $GLOBALS[ID] which makes php think that it should look for a constant named "ID" to use for substituion in the array, and fails. My expernice is that php normally makes the right choice and falls back to a varaible, but can give it the incorrect scope, hence your problems.. It pays to be extra pedantic about variable scope and importation becasue this is where most security issues come from, not to mention by not specficly telling php what kind ofvariable you're using, icky and hard to trace bugs (like this one) can be introduced. -n > >In anycase, the whole file now looks like this: > > > ><?php > >error_reporting(E_ALL); > >require('config.php3'); > > > >if ($debug && $HTTP_GET_VARS[breakme]) { > > echo "I'm outputing something to break the headers.<br>\n"; > > echo "This will allow me to see what exactly I'm sending.<br>\n"; > > echo "Including errors :)<br>\n"; > >} > > > >class Image { > > var $db; > > function Image() { > > $ID=$GLOBALS[ID]; > > $this->db = new proDB; > > echo "this isn't working"; > > $sql="SELECT photo FROM WLPphoto WHERE profileID='$ID'"; > > echo $this->db->nf(); > > $this->db->query($sql); > > while ($this->db->next_record()) { > > // Header("Content-type: image/jpeg"); > > print $this->db->Record['photo']; > > } > > } > >} > >?> > > -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- nathan hruby / digital statement na...@ds... http://www.dstatement.com/ Public GPG key can be found at: http://www.dstatement.com/nathan-gpg-key.txt ED54 9A5E 132D BD01 9103 EEF3 E1B9 4738 EC90 801B -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- |