Is it right if i using the sources of cpg (login, sql, cookie ...) as a main code to make another script like portal.
depends on what you want to do with the subsequent code: as coppermine is released under GNU GPL, you will have to release the code you come up with under GNU GPL as well (if you plan to release it at all). If you only plan to use the code for your personal use (or the use of your company website etc.), you don't have to publish the modified code.
Details are being explained in the license text that comes with coppermine and that can be reviwed online as well: http://www.gnu.org/copyleft/gpl.html
It's recommended that you take a look at the FAQ page there as well.
Joachim
thansk